sachinchoolur / lightslider

JQuery lightSlider is a lightweight responsive Content slider with carousel thumbnails navigation
http://sachinchoolur.github.io/lightslider/
MIT License
2.04k stars 1.52k forks source link

[Question] Hide Prev/Next buttons option #474

Open ADDISON74 opened 3 years ago

ADDISON74 commented 3 years ago

Is it possible to hide Prev/Next buttons when the slide reaches the first/last image?

By hiding these buttons we let know the visitor it is the end of the slide. I am not using loops because this feature creates confusion. Not all people realize when is the end of a slide.

larrynalzaro commented 1 year ago

You can write a little code to compare getCurrentSlideCount() against getTotalSlideCount(). If they are equal that means the last slide is reached. If getCurrentSlideCount() = 1 then that pretty much tells you that it's the first slide.