richardscarrott / jquery-ui-carousel

jQuery RS Carousel is a responsive and touch-enabled carousel written on top of jQuery and the jQuery UI Widget Factory providing a full and familiar API in less than 2.6kB minified and gzipped.
http://richardscarrott.github.io/jquery-ui-carousel/
192 stars 56 forks source link

Disable both the left and right buttons when the widget is disabled. #55

Closed gepoch closed 11 years ago

gepoch commented 11 years ago

When the app is in a disabled state, and external left/right buttons are added using the 'insertPrevAction' and 'insertNextAction' methods, the 'Prev' button remains enabled.

:) This fixes that!

richardscarrott commented 11 years ago

Good call, I've also added a disabled class to the pagination so it can be styled outside the root element too. On top of that your changes made me think that 'disabled' is the wrong class to give to the next and prev buttons when they're 'inactive' (i.e. when on the first or last page) so 'rs-carousel-action-active' is used instead and 'rs-carousel-action-disabled' will only ever be added when the widget is actually disabled.