Home >Web Front-end >JS Tutorial >The problem of mixing setInterval, setTimeout and jquery_jquery
Method 1. Calling other methods directly in ready will prompt a missing object error. Applying the jQuery extension can solve this problem.
$.extend({
show:function(){
alert("ready");
}
});
setInterval("$.show()", 3000);
});
Method 2. Do not use quotation marks and parentheses when specifying a function to be executed regularly.