Issue with disabled state on prev/next buttons when using a carrousel pager with a slideshow#313
Open
leup wants to merge 1 commit intomalsup:masterfrom
Open
Issue with disabled state on prev/next buttons when using a carrousel pager with a slideshow#313leup wants to merge 1 commit intomalsup:masterfrom
leup wants to merge 1 commit intomalsup:masterfrom
Conversation
|
Thanks @leup, this helped me out. I can confirm it works with the current "prevnext plugin for Cycle2; version: 20140408". |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Hello there,
When using a carousel pager there is a bug with prev/next button losing their disabled state if the current slide slide is beyond the boundary slide.
It can be seen on the demo page:
http://jquery.malsup.com/cycle2/demo/caro-pager.php
The next button become disabled when the slide 4 is reached. But clicking on any pager slide beyond the fourth will remove the disabled state.
Here is the code adding/removing the disabled state/class to the buttons.
I have modified it by replacing "==" tests with ">=" and "<=" respectively.
Notice: the bug has been verified with the next button, I am not sure there is a bug with the prev button as my prev boundary is the first slide (index 0), there is nothing beyond this one.
This fix works for me but I am not sure if this is the correct way to fix it.