V
V
Vladislav2020-12-11 16:25:56
Layout
Vladislav, 2020-12-11 16:25:56

How to make the previous slide button appear when you click on the next slide button?

Greetings everyone, there is such an idea, initially the slider, when loading the page, only sees the button for scrolling the slides forward, when the user scrolls through one slide, that is, clicks on this button, the button for scrolling the previous slide appears on the left and when it reaches the first slide, the button will disappear again, thanks to everyone who helps

Answer the question

In order to leave comments, you need to log in

1 answer(s)
E
EastJesus, 2020-12-11
@SlavaMaxwell

Add a class to the button, add a style to this class for initial hiding (display: none or opacity: 0)
When you click on the second button, change this style for the first button, making it visible

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question