Automate slider with jquery?
<p>I have a slider that slides images across on the click of a button using the following function</p>

<pre><code>$(document).ready(function (){
$('#button a').click(function(){
    var integer = $(this).attr('rel');
    $('#myslide .cover').animate({left:-720*(parseInt(integer)-1)}) 
    $('#button a').each(function(){
    $(this).removeClass('active');
        if($(this).hasClass('button'+integer)){
            $(this).addClass('active')}
    });
}); 
});
</code></pre>

<p>Is it possible to automate this using jquery? </p>

<hr>

<p>Just found this oly unsure how I would go about implementing it....</p>

<pre><code>setInterval(function() {
      // Do something every 2 seconds
 }, 2000);
</code></pre>
