Skip to content
This repository has been archived by the owner on Aug 31, 2022. It is now read-only.

Commit

Permalink
the element handed off with the goto event is not a jquery object
Browse files Browse the repository at this point in the history
  • Loading branch information
johnbender committed Jan 27, 2016
1 parent 2abc7a3 commit b05df62
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion src/responsive-carousel.pagination.js
Original file line number Diff line number Diff line change
Expand Up @@ -64,6 +64,8 @@
} )
// update pagination on page change
.bind( "goto." + pluginName, function( e, to ){
to = $( to );

var index = to ? $( this ).find( "div.carousel-item" ).index( to.get( 0 ) ) : 0;

$( this ).find( "ol." + paginationClass + " li" )
Expand All @@ -90,4 +92,4 @@
$( e.target )[ pluginName ]( "_createPagination" );
} );

}(jQuery));
}(jQuery));

0 comments on commit b05df62

Please sign in to comment.