{"id":2451,"date":"2010-12-15T09:16:22","date_gmt":"2010-12-15T03:46:22","guid":{"rendered":"http:\/\/www.tothenew.com\/blog\/?p=2451"},"modified":"2010-12-15T09:16:22","modified_gmt":"2010-12-15T03:46:22","slug":"sleep-in-jquery","status":"publish","type":"post","link":"https:\/\/www.tothenew.com\/blog\/sleep-in-jquery\/","title":{"rendered":"Sleep in Jquery."},"content":{"rendered":"<p>Few days earlier, for achieving &#8220;<strong>Thread.sleep()<\/strong>&#8221; functionality in Jquery, I use javascript&#8217;s &#8220;<strong>setTimeout()<\/strong>&#8221;  method.<\/p>\n<p>I found that Jquery has a finer and better way for doing this, The &#8220;<strong>delay()<\/strong>&#8221; method<\/p>\n<p>Example: If I want to show an element after 1000 mili seconds then I would do it in following way:<\/p>\n<pre lang=\"javascript\">$(\"div .heading\").delay(1000).show()\r\n<\/pre>\n<p>Hope this little sharing helps to you.<\/p>\n<p>~<em>Chandan Luthra<\/em>~<br \/>\nchandan<span style=\"text-decoration: line-through;\">(at)<\/span>intelligrape<span style=\"text-decoration: line-through;\">(dot)<\/span>com<\/p>\n","protected":false},"excerpt":{"rendered":"<p>Few days earlier, for achieving &#8220;Thread.sleep()&#8221; functionality in Jquery, I use javascript&#8217;s &#8220;setTimeout()&#8221; method. I found that Jquery has a finer and better way for doing this, The &#8220;delay()&#8221; method Example: If I want to show an element after 1000 mili seconds then I would do it in following way: $(&#8220;div .heading&#8221;).delay(1000).show() Hope this little [&hellip;]<\/p>\n","protected":false},"author":5,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"iawp_total_views":36},"categories":[1],"tags":[],"aioseo_notices":[],"_links":{"self":[{"href":"https:\/\/www.tothenew.com\/blog\/wp-json\/wp\/v2\/posts\/2451"}],"collection":[{"href":"https:\/\/www.tothenew.com\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.tothenew.com\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.tothenew.com\/blog\/wp-json\/wp\/v2\/users\/5"}],"replies":[{"embeddable":true,"href":"https:\/\/www.tothenew.com\/blog\/wp-json\/wp\/v2\/comments?post=2451"}],"version-history":[{"count":0,"href":"https:\/\/www.tothenew.com\/blog\/wp-json\/wp\/v2\/posts\/2451\/revisions"}],"wp:attachment":[{"href":"https:\/\/www.tothenew.com\/blog\/wp-json\/wp\/v2\/media?parent=2451"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.tothenew.com\/blog\/wp-json\/wp\/v2\/categories?post=2451"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.tothenew.com\/blog\/wp-json\/wp\/v2\/tags?post=2451"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}