mirror of
https://github.com/jquery/jquery.git
synced 2026-04-20 03:01:22 -04:00
The `default` export is treated differently across tooling when transpiled to CommonJS - tools differ on whether `module.exports` represents the full module object or just its default export. Switch `src/` modules to named exports for tooling consistency. Fixes gh-5262 Closes gh-5292
18 lines
500 B
JavaScript
18 lines
500 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 );
|
|
};
|
|
} );
|
|
};
|