2d354fc241fe8e22e1284c2aedaf0d3120379434b5bf0f4a6aaf384dd2e6cbf9eb2de12eaa9e47333c23390ebaa74802d4e90307f00b8d6a0ba361eae78aec 534 B

1234567891011121314151617181920212223
  1. define( [
  2. "../core",
  3. "../queue",
  4. "../effects" // Delay is optional because of this dependency
  5. ], function( jQuery ) {
  6. "use strict";
  7. // Based off of the plugin by Clint Helfers, with permission.
  8. jQuery.fn.delay = function( time, type ) {
  9. time = jQuery.fx ? jQuery.fx.speeds[ time ] || time : time;
  10. type = type || "fx";
  11. return this.queue( type, function( next, hooks ) {
  12. var timeout = window.setTimeout( next, time );
  13. hooks.stop = function() {
  14. window.clearTimeout( timeout );
  15. };
  16. } );
  17. };
  18. return jQuery.fn.delay;
  19. } );