JSFiddle - React, Tailwind, and code Playground
by qustosh
JavaScript
jQuery.wait = function(time) {
return $.Deferred(function(dfd) {
setTimeout(dfd.resolve, time);
});
}
/*
jQuery.wait(2000)
.then(function(){
setTimeout(function(){
console.log('first');
setTimeout(arguments.callee,1000);
});
})
.then(function(){ console.log('second');});
*/