mirror of
https://github.com/jquery/jquery.git
synced 2026-04-20 03:01:22 -04:00
Neither of the removed links is crucial; one of them refers to a site that has since started being malicious; while the Web Archive links remain safe, some scanners warn about such links. Removing them is the safest thing to do. Fixes gh-4981 Closes gh-4991
18 lines
496 B
JavaScript
18 lines
496 B
JavaScript
import jQuery from "../core.js";
|
|
|
|
import "../queue.js";
|
|
import "../effects.js"; // Delay is optional because of this dependency
|
|
|
|
// Based off of the plugin by Clint Helfers, with permission.
|
|
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 ) {
|
|
var timeout = window.setTimeout( next, time );
|
|
hooks.stop = function() {
|
|
window.clearTimeout( timeout );
|
|
};
|
|
} );
|
|
};
|