jquery- stop auto refreshing onClick
<p>I'm running a jquery autorefresh code which get active soon the page is loaded. I've set timeinterval to 1second.which means that for every 1 sec page gets refreshed.
I want to know is there any method to stop auto refreshing onclick?</p>

<p><strong>Code</strong>:</p>

<pre><code>$(document).ready(function(){ 
    setTimeout("dummy()",500); 
});
function dummy(){ 
    setTimeout("checkalerts()",50); 
} 
function checkalerts() { 
    var url="includes/adda/hangouts/display_all_hangouts.php"; 
    $.post(url,function(data){ 
        $("#print").html(data).show(); 
        setTimeout("dummy()",1000); 
    }); 
}
</code></pre>
