function slide()
{
if($(\'.current\').is(\':last-child\')){
$(\'.current\').removeClass(\'.current\');
$(\'#imgholder\').first().addClass(\'.curr
If you want to keep the exact space between each function call use setTimeout instead setInterval. setInterval can overlap at some point and this is often not expected behavior.
(function test(){
setTimeout(function(){
console.log(1);
testt();
}, 2000)
})()