Sleep in Jquery.

15 / Dec / 2010 by Chandan Luthra 0 comments

Few days earlier, for achieving “Thread.sleep()” functionality in Jquery, I use javascript’s “setTimeout()” method.

I found that Jquery has a finer and better way for doing this, The “delay()” method

Example: If I want to show an element after 1000 mili seconds then I would do it in following way:

$("div .heading").delay(1000).show()

Hope this little sharing helps to you.

~Chandan Luthra~
chandan(at)intelligrape(dot)com

Tag -

FOUND THIS USEFUL? SHARE IT

Leave a comment -