There is a list of buttons, some of which are hidden.
You need to create a slide, which when you clicked on the "next" button switched to the next button, and if it is hidden, it showed this hidden button, when switching to the next hidden button, the previous one should disappear, and the current one should appear.
When switching to hidden buttons, the main buttons must maintain their state.
HTML
// CΠΏΠΈΡΠΎΠΊ Ρ ΠΊΠ½ΠΎΠΏΠΊΠ°ΠΌΠΈ <ul> <li class="slide visible"><button class="btn"/>Button Visible One</li> <li class="slide visible"><button class="btn"/>Button Visible Two</li> <li class="slide hidden"><button class="btn"/>Button Hidden One</li> <li class="slide hidden"><button class="btn"/>Button Hidden Two</li> </ul> // ΠΠ½ΠΎΠΏΠΊΠΈ Π΄Π»Ρ ΠΏΠ΅ΡΠ΅Π΄Π²ΠΈΠΆΠ΅Π½ΠΈΡ <button id="previous">Previos</button> <button id="next">Next</button> CSS
.hidden { display: none; } .visible { display: block; }