Thursday 20 March 2014

Hide/Show A Div After A Few Seconds repeatedly 2

We can achieve using javascript's setInterval() and setTimeout() method.

setInterval(function() { 
    $("#myDiv").hide(); 
    setTimeout(function() {     
       $("#myDiv").show(); 
    },1000);//hide timing
},3000); //show timing

Here is the DEMO

2 comments: