parent
ac1b32b88b
commit
ee2cecd675
@ -1,22 +1,18 @@
|
||||
<script type="text/javascript">
|
||||
$(document).ready(function(){
|
||||
$("#bing").load("https://raw.githubusercontent.com/meisnate12/PMM-Image-Sets/master/movies/readme.md");
|
||||
var acc = document.getElementsByClassName("image-accordion");
|
||||
var i;
|
||||
|
||||
for (i = 0; i < acc.length; i++) {
|
||||
acc[i].addEventListener("click", function() {
|
||||
this.classList.toggle("image-active");
|
||||
var parent = this.parentElement;
|
||||
var panel = this.nextElementSibling;
|
||||
if (panel.style.maxHeight){
|
||||
panel.style.maxHeight = null;
|
||||
} else {
|
||||
panel.style.maxHeight = panel.scrollHeight + "px";
|
||||
parent.style.maxHeight = parseInt(parent.style.maxHeight) + panel.scrollHeight + "px";
|
||||
}
|
||||
});
|
||||
}
|
||||
$("#bing").load("https://raw.githubusercontent.com/meisnate12/PMM-Image-Sets/master/movies/readme.md", function () {
|
||||
$(".image-accordion").click(function () {
|
||||
this.classList.toggle("image-active");
|
||||
var parent = this.parentElement;
|
||||
var panel = this.nextElementSibling;
|
||||
if (panel.style.maxHeight) {
|
||||
panel.style.maxHeight = null;
|
||||
} else {
|
||||
panel.style.maxHeight = panel.scrollHeight + "px";
|
||||
parent.style.maxHeight = parseInt(parent.style.maxHeight) + panel.scrollHeight + "px";
|
||||
}
|
||||
});
|
||||
});
|
||||
});
|
||||
</script>
|
||||
|
||||
|
Loading…
Reference in new issue