Difference between revisions of "MediaWiki:Common.js"

(Created page with "$(document).ready(function(){ $('.animated-grids').each(function() { var $current = $(this).children().first(); $current.addClass('active'); ...")
 
 
Line 22: Line 22:
  
 
});
 
});
 +
 +
//Google Analytics
 +
(function(i,s,o,g,r,a,m){i['GoogleAnalyticsObject']=r;i[r]=i[r]||function(){
 +
(i[r].q=i[r].q||[]).push(arguments)},i[r].l=1*new Date();a=s.createElement(o),
 +
m=s.getElementsByTagName(o)[0];a.async=1;a.src=g;m.parentNode.insertBefore(a,m)
 +
})(window,document,'script','//www.google-analytics.com/analytics.js','ga');
 +
 +
ga('create', 'UA-28926290-56', 'auto');
 +
ga('send', 'pageview');

Latest revision as of 19:01, 6 January 2015

$(document).ready(function(){
 
    $('.animated-grids').each(function() {
            var $current = $(this).children().first();
            $current.addClass('active');
        });
 
    setInterval(function() {
        $('.animated-grids').each(function() {

            var $current = $(this).children('.active');
            
            var $next = $current.nextAll(':not(.skip):first');
            if (!$next.length) {
                $next = $(this).children(':not(.skip):first');
            }
            $current.removeClass('active');
            $next.addClass('active');
        });
    }, 2000);


});

//Google Analytics
(function(i,s,o,g,r,a,m){i['GoogleAnalyticsObject']=r;i[r]=i[r]||function(){
(i[r].q=i[r].q||[]).push(arguments)},i[r].l=1*new Date();a=s.createElement(o),
m=s.getElementsByTagName(o)[0];a.async=1;a.src=g;m.parentNode.insertBefore(a,m)
})(window,document,'script','//www.google-analytics.com/analytics.js','ga');

ga('create', 'UA-28926290-56', 'auto');
ga('send', 'pageview');

Need wiki hosting?

Do you need a wiki for your Minecraft mod/gaming wiki? We'll host it for free! Contact us.

Other wikis

Indie-game wikis
Powered by Indie Wikis
Looking for a server?

Join Techworld - an amazing custom modpack server.