iosscripts / iosslider

iosslider is a jQuery plugin which allows you to integrate a customizable, cross-browser content slider into your web presence. Designed for use as a content slider, website banner, or image gallery.
http://iosscripts.com/iosslider
432 stars 103 forks source link

changeSlide option fired twice on last slide #105

Closed stefancova closed 12 years ago

stefancova commented 12 years ago

Hi, The changeSlide is still firing twice in stead of once but only with the last slide. Do you know how to fix this.

Thanks

iosscripts commented 12 years ago

That probably shouldn't be happening. Do you have a link to a demo/test case I could look at?

ColColonCleaner commented 12 years ago

Yes it was happening for me as well.

I'll explain in a little more detail. It only happens when the slider is at the right-most slide, so the last slide visible in the right hand side, is the last slide in the slider. Once the user begins to pull the slider past the last slide, onslidechange is fired and the slide index is incremented. So far i have only tested using my slider which has multiple slides on screen, so im not sure about your single slide case (which im assuming is your usual test case).

The error is visually not noticeable, it only came to my attention because i had position marking dots that were being pushed off the end when this happened.

EX: o = visible, x=not, 3 slides on screen Dots: XXOOO so last slides are visible.

action: begin to drag slider past the end (pull it more to the left) Dots result: XXXOO

it happens the instant slider is pulled past it's ending point, not when the slides pass their halfway point like the other times onchange is fired.

stefancova commented 12 years ago

My test case is the 7-Centered-Slides demo, I log the "onSlideChange" statement and it's fired two times at the last slide.

It's happen in autoslide, prev, next, and swipe mode

Here is a snaphot of firefox console with 3 slides : http://www.flickr.com/photos/paradire/7999798156/in/photostream

ColColonCleaner commented 12 years ago

Also if ^ logged the currentSlideNumber param in the args array, it would be incremented one more time than it should be.

iosscripts commented 12 years ago

Fantastic, I see it. I will try and get a fix out for ya.

stefancova commented 12 years ago

Thanks !

iosscripts commented 12 years ago

This has been resolved in v1.1.2.

stefancova commented 12 years ago

Hello Mark, 

I have an absolute DIV (named "#slider-cache") positionned  hover the "iosslider" because of the design. I already bind the "navNextSelector to #nav-next" and the "navPrevSelector to #nav-prev" in the #slider-cache and it's work well

But I dont know to bind the 'swipe' effect to the #nav-current. Do you know how can i do this ?

Here's a example of my code and an image to help you to understand my case

Thanks a lot Stefan


De : Marc Whitbread notifications@github.com À : iosscripts/iosSlider iosSlider@noreply.github.com Cc : stefan cova stecova@yahoo.fr Envoyé le : Mardi 2 octobre 2012 16h31 Objet : Re: [iosSlider] changeSlide option fired twice on last slide (#105)

This has been resolved in v1.1.2. — Reply to this email directly or view it on GitHub. --------- part of HTML --------

...
...
...

--------- part of CSS --------

slider-cache{

position : absolute;
z-index  : 20;

}

.ios-container-outer{ position : absolute; z-index : 10; }

stefancova commented 12 years ago

Mark,  Forget this email, i have found the solution with the CSS attribute 'pointer-events', 'none'

Thanks


De : stefan cova stecova@yahoo.fr À : iosscripts/iosSlider reply@reply.github.com Envoyé le : Jeudi 11 octobre 2012 11h46 Objet : Re: [iosSlider] changeSlide option fired twice on last slide (#105)

Hello Mark, 

I have an absolute DIV (named "#slider-cache") positionned  hover the "iosslider" because of the design. I already bind the "navNextSelector to #nav-next" and the "navPrevSelector to #nav-prev" in the #slider-cache and it's work well

But I dont know to bind the 'swipe' effect to the #nav-current. Do you know how can i do this ?

Here's a example of my code and an image to help you to understand my case

Thanks a lot Stefan


De : Marc Whitbread notifications@github.com À : iosscripts/iosSlider iosSlider@noreply.github.com Cc : stefan cova stecova@yahoo.fr Envoyé le : Mardi 2 octobre 2012 16h31 Objet : Re: [iosSlider] changeSlide option fired twice on last slide (#105)

This has been resolved in v1.1.2. — Reply to this email directly or view it on GitHub.