UNPKG

ddd-jquery

Version:

de-bowerified, de-amdified, de-gruntified... jQuery.

12 lines 464 B
var jQuery = require('../core'), __unnameddep__ = require('../queue'), __unnameddep__ = require('../effects'); 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 = setTimeout(next, time); hooks.stop = function () { clearTimeout(timeout); }; }); }; module.exports = jQuery.fn.delay;