R
R
Roman2015-07-31 13:08:32
Slider
Roman, 2015-07-31 13:08:32

Which slider has a slide end event in its arsenal?

We need a slider that would have an event when scrolling through all its slides

Answer the question

In order to leave comments, you need to log in

3 answer(s)
D
Denis Ineshin, 2015-07-31
@crotarost

There is no practical sense in such an event. That's why you're unlikely to find it.
However, it is very easy to calculate it. Any normal slider has an onChange event or something that returns the slide number. Well, then, knowing the number of slides and the number of the current slide, it is very easy to understand when you have screwed it up to the end.

S
Sergey, 2015-07-31
@karmis

Add the class 'theLastSlide' to the last element in the list of slides and check for it when scrolling

R
Roman, 2015-07-31
@crotaros

Thanks Dennis, I figured this out myself. But I decided to change the algorithm a little, since in my slider I can get the index of the current slide, and I plan to compare this index with the number of slides.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question