Merge "Use mw.util.debounce() in collapsibleTabs.js"
This commit is contained in:
commit
a29c815a4f
|
@ -4,8 +4,8 @@
|
||||||
* @class jQuery.plugin.collapsibleTabs
|
* @class jQuery.plugin.collapsibleTabs
|
||||||
*/
|
*/
|
||||||
( function () {
|
( function () {
|
||||||
var isRTL = document.documentElement.dir === 'rtl',
|
var boundEvent,
|
||||||
boundEvent = false,
|
isRTL = document.documentElement.dir === 'rtl',
|
||||||
rAF = window.requestAnimationFrame || setTimeout;
|
rAF = window.requestAnimationFrame || setTimeout;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@ -50,7 +50,7 @@
|
||||||
// if we haven't already bound our resize handler, bind it now
|
// if we haven't already bound our resize handler, bind it now
|
||||||
if ( !boundEvent ) {
|
if ( !boundEvent ) {
|
||||||
boundEvent = true;
|
boundEvent = true;
|
||||||
$( window ).on( 'resize', $.debounce( 100, function () {
|
$( window ).on( 'resize', mw.util.debounce( 100, function () {
|
||||||
rAF( $.collapsibleTabs.handleResize );
|
rAF( $.collapsibleTabs.handleResize );
|
||||||
} ) );
|
} ) );
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue