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(
This will wait 1 second and then assign the event handler...
function assignSampleClick() { $(".sample").live('click',function(){ var id=$(this).attr("id"); }); } // document ready $(function() { setTimeout(assignSampleClick, 1000); });