Created
October 26, 2011 15:32
-
-
Save parrfolio/1316694 to your computer and use it in GitHub Desktop.
Simple Auto Rotate Tabs Jquery
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
$(function() { | |
var $list = $('#animation li'); | |
$list.filter(':first').addClass('go'); | |
setInterval(function() { | |
if( $list.filter('.go').index() !== $list.length - 1 ) { | |
$list.filter('.go').removeClass('go').next().addClass('go'); | |
} | |
else { | |
$list.removeClass('go').filter(':first').addClass('go'); | |
} | |
}, 2000); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment