+ 3
My "next button" isn't working.
I have a button that is supposed to go to diffetent text when it is pushed but it's not working. I used the same JavaScript as I did for another project and it worked so I don't know why it won't won't work for this one. When I press it the heading for the other divs for my "web vulnerabilities" section are supposed to pop up. https://code.sololearn.com/WPMNdUMnUJ0y/?ref=app
6 Answers
+ 4
Ok may bad. I thought you meant the next button thingy
+ 4
Okay. Works for me :/
next.onclick=function(){
var previousSection=currentSection;
if(currentSection < sections.length + 1) ++currentSection;
if(currentSection == sections.length){
currentSection=0;
}
sections[currentSection].style.display="block";
sections[previousSection].style.display="none";
}
+ 2
Toni Isotalo I still have that sane error.
+ 2
*same
+ 2
I do mean the next button. It's still not working after I fixed my errors.
+ 2
Toni Isotalo Will you check my code to make sure I did it right?