function slide() { if($(\'.current\').is(\':last-child\')){ $(\'.current\').removeClass(\'.current\'); $(\'#imgholder\').first().addClass(\'.curr
You are looking for setInterval
See: https://developer.mozilla.org/en/window.setInterval