kswedberg / jquery-carousel-lite

A jQuery carousel plugin based on jCarouselLite by Ganeshji Marwaha
MIT License
177 stars 59 forks source link

Fix wrap-around, added test for wrap-around. Resolves issue #39 #40

Closed travco closed 10 years ago

travco commented 10 years ago

Resolves #39, where if the carousel advances in increments greater than one, upon wrapping-around the carousel will only move one. Fix is simply using the difference between the current and target slide to move to (instead of autoScrollBy) for relatively advancing the slides. Added a test to check if the carousel advances as much as it should post-wrap-around.

After this fix, the carousel will advance beyond the slides if you try to do something like $(".slideshow").trigger('go', '+=6'); when the slideshow only has 5 slides. I am running under the impression that adding code to "idiot-proof" this is unnecessary.

kswedberg commented 10 years ago

Closed by e6220b257e8e445863bdd92c15f516025ea77981