malsup / cycle2

2nd gen cycling
899 stars 238 forks source link

In the version 2.1.6 build: 20141007 the looping doesn't work #728

Open makbeta opened 8 years ago

makbeta commented 8 years ago

I had the data-cycle-allow-wrap="true" data-cycle-loop="1" parameters set for my slideshow, but for some reason it wasn't working. Instead it was getting 'terminating; loop=0' in debug message. So I checked out the source code and was able to track down the issue to the line 394 in jquery.cycle2.core.js if (opts.nextSlide === 0 && --opts.loop === 0) {

I believe that it should be changed to the statement below so the comparison for loop option returns a correct value. if (opts.nextSlide === 0 && opts.loop === 0) {