Blame view

app/bower_components/jquery/src/queue/delay.js 636 Bytes
87c93a029   Dang YoungWorld   add modal
1
  define( [
f986e111b   TRUONG   add libs
2
3
4
5
  	"../core",
  	"../queue",
  	"../effects" // Delay is optional because of this dependency
  ], function( jQuery ) {
87c93a029   Dang YoungWorld   add modal
6
  "use strict";
f986e111b   TRUONG   add libs
7
  // Based off of the plugin by Clint Helfers, with permission.
87c93a029   Dang YoungWorld   add modal
8
  // https://web.archive.org/web/20100324014747/http://blindsignals.com/index.php/2009/07/jquery-delay/
f986e111b   TRUONG   add libs
9
10
11
12
13
  jQuery.fn.delay = function( time, type ) {
  	time = jQuery.fx ? jQuery.fx.speeds[ time ] || time : time;
  	type = type || "fx";
  
  	return this.queue( type, function( next, hooks ) {
87c93a029   Dang YoungWorld   add modal
14
  		var timeout = window.setTimeout( next, time );
f986e111b   TRUONG   add libs
15
  		hooks.stop = function() {
87c93a029   Dang YoungWorld   add modal
16
  			window.clearTimeout( timeout );
f986e111b   TRUONG   add libs
17
  		};
87c93a029   Dang YoungWorld   add modal
18
  	} );
f986e111b   TRUONG   add libs
19
20
21
  };
  
  return jQuery.fn.delay;
87c93a029   Dang YoungWorld   add modal
22
  } );