Widget: EvolveImageToggle

From Mr Love Queen's Choice
Jump to: navigation, search
   <input type="checkbox" id="evolve-toggle" placeholder="Search" onclick="toggleIcons();" style="webkit-box-shadow: none; box-shadow: none;"> Show Evolved Karma Icons

<script type="text/javascript">

   function toggleIcons() {
       var checkbox = document.getElementById("evolve-toggle");
       var unevolvedIcons = document.getElementsByClassName("unevolved-icon");
       var evolvedIcons = document.getElementsByClassName("evolved-icon");
       if (checkbox.checked) {
           for (var i = 0; i < unevolvedIcons.length; i++) {
                 var unevolved = unevolvedIcons[i];
                 var evolved = evolvedIcons[i];
                 evolved.style.display = ;
                 unevolved.style.display = 'none';
           }
       } else {
           for (var i = 0; i < unevolvedIcons.length; i++) {
                 var unevolved = unevolvedIcons[i];
                 var evolved = evolvedIcons[i];
                 unevolved.style.display = ;
                 evolved.style.display = 'none';
           }
       }  
   }

</script>