Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 3 additions & 4 deletions src/jquery.cycle2.autoheight.js
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,6 @@ $(document).on( 'cycle-initialized', function( e, opts ) {
return;

// bind events
opts.container.on( 'cycle-slide-added cycle-slide-removed', initAutoHeight );
opts.container.on( 'cycle-destroyed', onDestroy );

if ( autoHeight == 'container' ) {
Expand All @@ -31,15 +30,15 @@ $(document).on( 'cycle-initialized', function( e, opts ) {
opts._autoHeightRatio = ratio;
}

// if autoHeight is a number then we don't need to recalculate the sentinel
// index on resize
// if autoHeight is calc or ratio then we need to recalculate the sentinel
// index on resize, and also on slide-added/slide-removed
if ( t !== 'number' ) {
// bind unique resize handler per slideshow (so it can be 'off-ed' in onDestroy)
opts._autoHeightOnResize = function () {
clearTimeout( resizeThrottle );
resizeThrottle = setTimeout( onResize, 50 );
};

opts.container.on( 'cycle-slide-added cycle-slide-removed', opts._autoHeightOnResize );
$(window).on( 'resize orientationchange', opts._autoHeightOnResize );
}

Expand Down
2 changes: 1 addition & 1 deletion src/jquery.cycle2.pager.js
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ $.extend($.fn.cycle.defaults, {
pagerActiveClass: 'cycle-pager-active',
pagerEvent: 'click.cycle',
pagerEventBubble: undefined,
pagerTemplate: '<span>&bull;</span>'
pagerTemplate: '<button>&bull;</button>'
});

$(document).on( 'cycle-bootstrap', function( e, opts, API ) {
Expand Down