Difference between revisions of "Team:IIT Kanpur"

Line 227: Line 227:
 
   slides[slideIndex-1].style.display = "block";  
 
   slides[slideIndex-1].style.display = "block";  
 
   dots[slideIndex-1].className += " active";
 
   dots[slideIndex-1].className += " active";
 +
}
 +
</script>
 +
 +
<script>
 +
var coll = document.getElementsByClassName("collapsible");
 +
var i;
 +
 +
for (i = 0; i < coll.length; i++) {
 +
  coll[i].addEventListener("click", function() {
 +
    this.classList.toggle("active");
 +
    var content = this.nextElementSibling;
 +
    if (content.style.maxHeight){
 +
      content.style.maxHeight = null;
 +
    } else {
 +
      content.style.maxHeight = content.scrollHeight + "px";
 +
    }
 +
  });
 
}
 
}
 
</script>
 
</script>

Revision as of 17:17, 17 October 2018