mirror of
https://github.com/jquery/jquery.git
synced 2024-11-23 02:54:22 +00:00
Renaming 'runner' to 'hooks' - makes it a little more obvious whats happening
This commit is contained in:
parent
38f087b5ae
commit
0191e98934
4
src/effects.js
vendored
4
src/effects.js
vendored
@ -270,9 +270,9 @@ jQuery.fn.extend({
|
|||||||
}
|
}
|
||||||
|
|
||||||
function stopQueue( elem, data, i ) {
|
function stopQueue( elem, data, i ) {
|
||||||
var runner = data[ i ];
|
var hooks = data[ i ];
|
||||||
jQuery.removeData( elem, i, true );
|
jQuery.removeData( elem, i, true );
|
||||||
runner.stop( gotoEnd );
|
hooks.stop( gotoEnd );
|
||||||
}
|
}
|
||||||
|
|
||||||
if ( type == null ) {
|
if ( type == null ) {
|
||||||
|
10
src/queue.js
10
src/queue.js
@ -71,7 +71,7 @@ jQuery.extend({
|
|||||||
|
|
||||||
var queue = jQuery.queue( elem, type ),
|
var queue = jQuery.queue( elem, type ),
|
||||||
fn = queue.shift(),
|
fn = queue.shift(),
|
||||||
runner = {};
|
hooks = {};
|
||||||
|
|
||||||
// If the fx queue is dequeued, always remove the progress sentinel
|
// If the fx queue is dequeued, always remove the progress sentinel
|
||||||
if ( fn === "inprogress" ) {
|
if ( fn === "inprogress" ) {
|
||||||
@ -85,10 +85,10 @@ jQuery.extend({
|
|||||||
queue.unshift( "inprogress" );
|
queue.unshift( "inprogress" );
|
||||||
}
|
}
|
||||||
|
|
||||||
jQuery._data( elem, type + ".run", runner );
|
jQuery._data( elem, type + ".run", hooks );
|
||||||
fn.call( elem, function() {
|
fn.call( elem, function() {
|
||||||
jQuery.dequeue( elem, type );
|
jQuery.dequeue( elem, type );
|
||||||
}, runner );
|
}, hooks );
|
||||||
}
|
}
|
||||||
|
|
||||||
if ( !queue.length ) {
|
if ( !queue.length ) {
|
||||||
@ -127,9 +127,9 @@ jQuery.fn.extend({
|
|||||||
time = jQuery.fx ? jQuery.fx.speeds[ time ] || time : time;
|
time = jQuery.fx ? jQuery.fx.speeds[ time ] || time : time;
|
||||||
type = type || "fx";
|
type = type || "fx";
|
||||||
|
|
||||||
return this.queue( type, function( next, runner ) {
|
return this.queue( type, function( next, hooks ) {
|
||||||
var timeout = setTimeout( next, time );
|
var timeout = setTimeout( next, time );
|
||||||
runner.stop = function() {
|
hooks.stop = function() {
|
||||||
clearTimeout( timeout );
|
clearTimeout( timeout );
|
||||||
};
|
};
|
||||||
});
|
});
|
||||||
|
Loading…
Reference in New Issue
Block a user