mirror of
https://github.com/jquery/jquery.git
synced 2026-02-02 08:55:24 -05:00
Conflicts: Gruntfile.js README.md src/ajax.js src/ajax/xhr.js src/attributes.js src/core.js src/css.js src/data.js src/effects.js src/event.js src/manipulation.js src/offset.js src/selector-native.js src/traversing.js test/unit/core.js test/unit/data.js
This commit is contained in:
21
src/queue.js
21
src/queue.js
@@ -1,3 +1,9 @@
|
||||
define([
|
||||
"./core",
|
||||
"./deferred",
|
||||
"./callbacks"
|
||||
], function( jQuery ) {
|
||||
|
||||
jQuery.extend({
|
||||
queue: function( elem, type, data ) {
|
||||
var queue;
|
||||
@@ -97,19 +103,6 @@ jQuery.fn.extend({
|
||||
jQuery.dequeue( this, type );
|
||||
});
|
||||
},
|
||||
// Based off of the plugin by Clint Helfers, with permission.
|
||||
// http://blindsignals.com/index.php/2009/07/jquery-delay/
|
||||
delay: function( time, type ) {
|
||||
time = jQuery.fx ? jQuery.fx.speeds[ time ] || time : time;
|
||||
type = type || "fx";
|
||||
|
||||
return this.queue( type, function( next, hooks ) {
|
||||
var timeout = setTimeout( next, time );
|
||||
hooks.stop = function() {
|
||||
clearTimeout( timeout );
|
||||
};
|
||||
});
|
||||
},
|
||||
clearQueue: function( type ) {
|
||||
return this.queue( type || "fx", [] );
|
||||
},
|
||||
@@ -144,3 +137,5 @@ jQuery.fn.extend({
|
||||
return defer.promise( obj );
|
||||
}
|
||||
});
|
||||
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user