One section will be show and this will happen using a class active.
In the same page i have li buttons 1, 2 and 3 when i click on one of them the section related appear and the old one disappear for that i'm using javascript to do it.
Also in the same page i have a next and previous button when i click on the next button i should appear the next section and disapear the old one.
And also the relate li to the section should have the class active the same thing for the previous when i click on it i should go to the old section and disappear the current one and the li number should be active.
And when i'm in the first section the previous button should be disapear and when i'm in the last section the next button should be disapear
How can i do the next and previous buttons in this way using javascrip?
0 Answer(s)