views:

210

answers:

3

How to show and hide div every 1min in jquery

+6  A: 

Give a look to the setInterval core function and to the jQuery's Effects/toggle function:

setInterval(function(){$('#myDiv').toggle();}, 60000);
CMS
doh beat me to it by a few seconds :)
Darko Z
+2  A: 

Try this:

setInterval(function() { $("#myDiv").toggle(); }, 60000);
Darko Z
+1  A: 

There is a timer plugin that you can use

http://plugins.jquery.com/project/Timer

To flip show/hide, you can do something like this

   <div id="mydiv">The div that you want to show and hide</div>
    <script>
    $.timer(1000, function () {
            $("#mydiv").toggle()
        });
    </script>

hope this help!

Roy Chan