Skip to content

Instantly share code, notes, and snippets.

@parrfolio
Created October 26, 2011 15:32
Show Gist options
  • Save parrfolio/1316694 to your computer and use it in GitHub Desktop.
Save parrfolio/1316694 to your computer and use it in GitHub Desktop.
Simple Auto Rotate Tabs Jquery
$(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