jquery blinking text and div reload <p>I have a div that refreshes every 30 seconds and I also have text that blinks if it's new content (checked by a cookie).</p> <pre><code>setInterval(function() { $('#reload').load('/page.php #reload'), function() {} }, 30000); // check if atis cookie exits var Key = $("#key").data('key'); if ($.cookie('check_'+Key) == null) { $('.blink_'+Key).each(function() { var elem = $(this); setInterval(function() { if (elem.css('visibility') == 'hidden') { elem.css('visibility', 'visible'); } else { elem.css('visibility', 'hidden'); } }, 500); }); } </code></pre> <p>The blinking works perfectly...until the div refreshes. Once the div refreshes, the blinking stops. I've tried adding the blinking code inside the refresh function, but no avail.</p> <p>Any ideas?</p>