Difference between revisions of "MediaWiki:Common.js"
Jump to navigation
Jump to search
(Created page with "if ($('.animated').length) { setInterval(function () { $('.animated').each(function () { var current = $(this).find('.active').removeClass('active'); ...") |
|||
Line 1: | Line 1: | ||
+ | function animate() { | ||
+ | $('.animated').each(function () { | ||
+ | var current = $(this).find('.active').removeClass('active'); | ||
+ | next = current.next().length ? current.next() : $(this).children().eq(0); | ||
+ | next.addClass('active'); | ||
+ | }); | ||
+ | setTimeout(animate, 1500); | ||
+ | } | ||
+ | |||
if ($('.animated').length) { | if ($('.animated').length) { | ||
− | + | animate(); | |
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
} | } |
Latest revision as of 19:37, 10 September 2013
function animate() {
$('.animated').each(function () {
var current = $(this).find('.active').removeClass('active');
next = current.next().length ? current.next() : $(this).children().eq(0);
next.addClass('active');
});
setTimeout(animate, 1500);
}
if ($('.animated').length) {
animate();
}