Pausing function in javascript
<p>I have a function which loops through rows in a table so that only one is shown at any given time.</p>

<p>I want to expand on this so that when I hover over the table, it shows all the rows, and then when I move away, it resumes showing one row at a time. </p>

<p>The Problem I have is that on hovering, the first function keeps going, is there a way to 'pause' the function. I've looked at various examples using ClearInterval(),but can't match them to my script.</p>

<pre><code>//Calling The function that loops through the rows    
function hideShow(time)
{   
    setInterval('showRows()',time); 
};      

//Set the time between each 'loop' and start looping 
$(document).ready(function()
{
    hideShow(2000);
}   
);

//The hover function to show / hide all the rows
$(document).ready(function()
{
    $('#dbTable1 tr').hover(function() 
        {
            $('.Group td').removeClass('RoundBottom');
            $('.Group').show();
        },  
        function()
        {
            $('.Group td').addClass('RoundBottom');
            $('.Group').hide();
        }
    ); 
}
);
</code></pre>

<p>Can anyone show me please how I can combine the two?</p>
