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

Issues in Loop option #476

Open dhhuy0704 opened 3 years ago

dhhuy0704 commented 3 years ago

Hi, I will make it short !

  1. Loop option doesn't run with "true" or "1" or 1. I have tried to store options value in database and put it back to lightSlider initialized function. However, loop option doesn't understand "true" or "1" or 1, only true (boolean) is accepted.

  2. The loop of images doesn't run circle. My options configuration:

    
    $("#content-slider").lightSlider({
        auto: "true",
        enableDrag: "true",
        enableTouch: "true",
        item: "2",
        keyPress: "false",
        loop: "true",
        pause: "4000",
        speed: "2000"
    })

If I set `speed: "2000"` and above, the loop ran to the end and jump back to the first images instead of running first image at the end of slide.
![1111](https://user-images.githubusercontent.com/10137579/137206431-238458ec-74c0-44e8-8e53-9c08e4cd7964.gif)

If I set  `speed: "1000"` and below, the loop ran as expected.

![2222](https://user-images.githubusercontent.com/10137579/137206571-e7be1347-9e25-40aa-aef0-08b85cb6ba81.gif)

Thank you.
ghost commented 2 years ago

Same problem for me.

larrynalzaro commented 8 months ago

Dude,

Remove the quotes from the true value. That's why it's not looping; it does not understand "true".