Skip to content

Conversation

@leup
Copy link

@leup leup commented Oct 5, 2013

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.

@rutger1140
Copy link

Thanks @leup, this helped me out. I can confirm it works with the current "prevnext plugin for Cycle2; version: 20140408".

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants