0
Web designing
Toggle is not working... plz help to find error https://code.sololearn.com/W2d9jWglmZN6/?ref=app
3 Answers
+ 2
PANKAJ NAIK Change the if else block to this
if(x.style.display === "none"){
x.style.display = "block";
} else {
x.style.display = "none";
}
or try this
function slideshow(){
var x = document.getElementById("check");
if(x.style.display === "none") x.style.display = "block";
else x.style.display = "none";
}
And change the function name to slideshow() in the <a> tag
+ 1
âștq Dhanush Adithya ....Gordon
0
classList API
https://code.sololearn.com/WujhXtk76Pxw/?ref=app