KevinBatdorf / liquidslider

A Responsive jQuery Content Slider
161 stars 62 forks source link

continuous: false doesn't work #154

Closed rodento closed 9 years ago

rodento commented 9 years ago

Hello Kevin,

I'm not sure in understanding autoSlide- in conjunction with continuous-option. When setting autoSlide: true and continuous: false, I thought all slides will progress forward once a time and arriving at the last slide it will stop. In my case it is starting from the first slide, after arriving at the last slide. How can I stop autosliding, when the last slide is arrived.

txs in advance rob

KevinBatdorf commented 9 years ago

autoslide would just have it continue for ever. I think that's pretty standard practice among any sort of autoslide functionality. I could be wrong though...

Anyway, you could just tell the slider to stop the autoslider when it reaches the last slide. In the settings:

pretransition: function() {
    if (this.nextPanel === 4) {
        this.stopAutoSlide();
    }
    this.transition();
}
rodento commented 9 years ago

Hello Kevin, thank you very much for your fast reply. Unfortunately this.StopAutoSlide() has no effect.

    $('#slider-id').liquidSlider({ 
        autoSlide: true,
        autoHeight:true,
        minHeight: 600,
        slideEaseFunction:'animate.css',
        pauseOnHover: true,
        autoSlideInterval: 5000,
        animateIn:"fadeIn",
        animateOut:"fadeOut",
        pretransition: function() {
            if (this.nextPanel === 4) {
                this.stopAutoSlide();
            }
            this.transition();
        }
    });
KevinBatdorf commented 9 years ago

Does nextPanel ever equal 4? Do you have a link somewhere?

rodento commented 9 years ago

Yes nextPanel works. Unforunately I can't give you a link, as I' m coding on the local apache of my Mac.