Skip to content

Commit

Permalink
Fixed issue with next/prev ‘disabled’ state that was kind of breaking…
Browse files Browse the repository at this point in the history
… everything.
  • Loading branch information
Wilto committed Sep 12, 2011
1 parent 8153efe commit fd9af96
Showing 1 changed file with 3 additions and 5 deletions.
8 changes: 3 additions & 5 deletions plugin.js
Expand Up @@ -220,11 +220,10 @@

$target.removeClass( opt.namespace + '-disabled' );

if( ind === 0 ) {
$target.filter(opt.nextSlide).addClass( opt.namespace + '-disabled' );
}
if( ind === $slides.length - 1 ) {
if( ind == 0 ) {
$target.filter(opt.prevSlide).addClass( opt.namespace + '-disabled' );
} else if( ind == $slides.length - 1 ) {
$target.filter(opt.nextSlide).addClass( opt.namespace + '-disabled' );
}
}

Expand Down Expand Up @@ -363,7 +362,6 @@
});


$slidewrap.find( opt.slide ).length > 1 &&
$slidewrap.filter('[data-autorotate]').each(function() {
var auto,
$el = $(this),
Expand Down

0 comments on commit fd9af96

Please sign in to comment.