How to wait 5 seconds with jQuery?

If you want to delay your jQuery code to run after some amount of time, you can use JavaScript setTimeout function to delay the execution. setTimeout is used in JavaScript to delay execution of some code and the same function can be use with jQuery without any extra effort.

    window.location = "welcome.php";
}, 2000);

Leave a Reply

Your email address will not be published. Required fields are marked *