Skip to content

Instantly share code, notes, and snippets.

Created June 26, 2012 18:34
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
Star You must be signed in to star a gist
Save anonymous/2997811 to your computer and use it in GitHub Desktop.
if ($('.animated').length) {
setInterval(function () {
$('.animated').each(function () {
var current = $(this).find('.active').removeClass('active');
next = current.next().length ? current.next() : $(this).children().eq(0);
next.addClass('active');
});
}, 2000);
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment