How to call a jquery function onload with some delay?
I want to call a function like this on load with some delay
$(\".sample\").live(\'click\',function(
you could use setTimeout function you must refactor your code as something like this
//2 seconds wait before calling doJob $(".sample").live('click',function(){ setTimeout(doJob, 2000);}); function doJob(){ var id=$(this).attr("id"); //other statements ... }