JQuery restart setInterval <p>Sorry to be a bore but having trouble restarting a setInterval with a toggle function. I get to stop it - when needed, but I cannot get it to restart when the toggle "closes"</p> <p>Here is my code </p> <p>Set the setInterval</p> <pre><code>var auto_refresh = setInterval( function() { $('.holder').load('board.php'); }, 5000 ); </code></pre> <p>Stop on toggle - BUT want it to start on the "reverse toggle"</p> <pre><code>$('.readmore').live('click',function() { $(this).next().slideToggle('slow'); clearInterval(auto_refresh); }, function() { var auto_refresh = setInterval( function() { $('.holder').load('board.php'); }, 5000 ); }); </code></pre> <p>Help much appreciated, as is prob. very simple just I've never beed good at putting functions "within functions"</p>