0

Web designing

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

27th Mar 2020, 4:38 AM
PANKAJ NAIK
PANKAJ NAIK - avatar
3 ответов
+ 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
27th Mar 2020, 4:56 AM
deeyae
deeyae - avatar
+ 1
27th Mar 2020, 5:31 AM
PANKAJ NAIK
PANKAJ NAIK - avatar
27th Mar 2020, 5:13 AM
Gordon
Gordon - avatar