function slide() { if($(\'.current\').is(\':last-child\')){ $(\'.current\').removeClass(\'.current\'); $(\'#imgholder\').first().addClass(\'.curr
This problem usually happens when you used setTimeout in recursion loop, for example in ajax callback and when you want to run something out of recursion, you expect setTimeout to work as past. remember to use setInterval in non-recursion functions.