malsup / cycle2

2nd gen cycling
899 stars 239 forks source link

Two executions of command when using cycle-update-view #811

Closed Cocopocoloco closed 7 years ago

Cocopocoloco commented 7 years ago

Hello,

When i am executing this

$('#cycle_container').on('cycle-update-view', function(event, optionHash, slideOptionsHash, currentSlideEl){ currentSlide = optionHash.currSlide; console.log('Slide : '+currentSlide); }

Commands in are executed two times. I have got two "Slide : 1" in my JS console , for example. Best regards.

Cocopocoloco commented 7 years ago

OK, data-cycle-update-view="-1" is the answer. :-)