0

Web designing

Toggle is not working... plz help to find error https://code.sololearn.com/W2d9jWglmZN6/?ref=app

3/27/2020 4:38:29 AM

PANKAJ NAIK

3 Answers

New Answer

+1

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