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
2009-07-13 00:17:52
doh beat me to it by a few seconds :)
Darko Z
2009-07-13 00:18:58
+2
A:
Try this:
setInterval(function() { $("#myDiv").toggle(); }, 60000);
Darko Z
2009-07-13 00:18:12
+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
2009-07-13 00:24:14