Difference between revisions of "MediaWiki:Vector.js"

From TerraFirmaCraft Wiki
Jump to: navigation, search
m
(Revert)
 
Line 1: Line 1:
 
/* Any JavaScript here will be loaded for users using the Vector skin */
 
/* Any JavaScript here will be loaded for users using the Vector skin */
 
function sticky_relocate() { 
 
    var window_top = $(window).scrollTop(); 
 
    var div_top = $('#mw-page-base').offset().top; 
 
    if (window_top > div_top) { 
 
        $('#p-googleadsense').addClass('sticky'); 
 
    } else { 
 
        $('#p-googleadsense').removeClass('sticky'); 
 
    } 
 
 
 
$(function () { 
 
    $(window).scroll(sticky_relocate); 
 
    sticky_relocate(); 
 
});
 

Latest revision as of 00:10, 21 July 2016

/* Any JavaScript here will be loaded for users using the Vector skin */