I want to set timer on body onload eventHandler to call function where I show hide div.
onload eventHandler
Use jquery, it less..
function foo() { // method show should be called. $("#idDiv").show(); } function bar() { setTimeout(foo(), 1000) }