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(
Try it like this..
$(document).ready(function () { setTimeout(function () { $(".sample").live('click',function(){ var id=$(this).attr("id"); }, 3000); }, 3000);
This will fire on page load after 3 seconds delay.