Delay a window.setInterval() function on click of an element
<p>This is my code : </p>

<pre><code>window.setInterval(function(){
            if(cursor == number_of_images-1){
                cursor=-1;
            }
            cursor = cursor+1;
            var mar = cursor*940;
                    $("#innerslider").delay(1000).animate({"margin-left":-mar+"px"}, {duration: 1000, queue: true});

            }, 5000);
</code></pre>

<p>Its work is to keep changing the <code>margin-left</code> property of the <code>css</code>, It works fine.
Now I want to make sure that when a certain element on the page is clicked then the above function don't run till next five seconds. How can I do that ?</p>
