The setTimeout() function in JQuery realizes the pause for a fixed time.

JQuery's setTimeout() function is used to pause for a period of time and then perform the next operation.

setTimeout(function () {
    
    
            $("#code").css("border","0px solid red");
            $(".aaa").css("display","none");
        },6000);

The function of the above code is to pause for 6 seconds, and then execute the code in function(){ }.

Guess you like

Origin blog.csdn.net/Wangdiankun/article/details/106356598