* - Toggle gallery captions when focused.
* - Dynamically resize images to fill horizontal space.
*/
-( function ( mw, $ ) {
+( function () {
var $galleries,
bound = false,
lastWidth = window.innerWidth,
if ( !bound ) {
bound = true;
$( window )
- .resize( $.debounce( 300, true, handleResizeStart ) )
- .resize( $.debounce( 300, handleResizeEnd ) );
+ .on( 'resize', $.debounce( 300, true, handleResizeStart ) )
+ .on( 'resize', $.debounce( 300, handleResizeEnd ) );
}
} );
} );
-}( mediaWiki, jQuery ) );
+}() );