All setTimeOut

Problem: javascript setTimeout executes function immediately

JavaScript has setTimeout() method which calls a function or evaluates an expression after a specified number of milliseconds. See below code, setTimeout(function(){alert("Hello")}, 3000); Above code will display an alert after 3 seconds. Let's take another example, setTimeout(Func1(), 2000); You must be thinking that "Func1()" will be executed after 2 seconds. No, You are wrong. The […]
Read the rest of this entry »

How to use jQuery setTimeout function

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. Since jQuery is written on top […]
Read the rest of this entry »