How can I stop a repeating function when the mouse is clicked?
<p>I could really use some help. I have a javascript / jquery slider below that repeats over and over. I would like it to stop repeating when a specific button is clicked if possible. I am a complete novice and it took a lot to get to this point! Any help would be greatly appreciated.</p>

<pre><code>$(document).ready(function () {

    var i = 0;
    var z = 0;
    delay = 5000;
    var el = $('#scroll-script');
    var ql = $('#info-box');
    var classesb = ['fp-info-one', 'fp-info-two', 'fp-info-three', 'fp-info-four'];
    var classes = ['fp-slide-one', 'fp-slide-two', 'fp-slide-three', 'fp-slide-four'];
    var interval = setInterval(function () {
        el.removeClass().addClass(classes[i]);
        i = (i + 1) % 4;
        ql.removeClass().addClass(classesb[z]);
        z = (z + 1) % 4;
    }, delay);

});
</code></pre>
