]> git.r.bdr.sh - rbdr/dotfiles/blob - atom/packages/ex-mode/node_modules/space-pen/node_modules/jquery/src/queue/delay.js
4b4498cea1f2697c1470aa85640a5ee26bcff3f3
[rbdr/dotfiles] / atom / packages / ex-mode / node_modules / space-pen / node_modules / jquery / src / queue / delay.js
1 define([
2 "../core",
3 "../queue",
4 "../effects" // Delay is optional because of this dependency
5 ], function( jQuery ) {
6
7 // Based off of the plugin by Clint Helfers, with permission.
8 // http://blindsignals.com/index.php/2009/07/jquery-delay/
9 jQuery.fn.delay = function( time, type ) {
10 time = jQuery.fx ? jQuery.fx.speeds[ time ] || time : time;
11 type = type || "fx";
12
13 return this.queue( type, function( next, hooks ) {
14 var timeout = setTimeout( next, time );
15 hooks.stop = function() {
16 clearTimeout( timeout );
17 };
18 });
19 };
20
21 return jQuery.fn.delay;
22 });