Jump to content

MediaWiki:Vector.js: Difference between revisions

Created page with "Any JavaScript here will be loaded for users using the Vector skin: sticky skyscrapper banner: $(window).scroll(function() { if ($(window).scrollTop()>1200){ /..."
 
No edit summary
 
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 */
/*sticky skyscrapper banner*/
$(window).scroll(function() {
  if ($(window).scrollTop()>1200){
    //alert($(document).scrollTop());
    $('.portal ins.adsbygoogle').css("position", "fixed"); 
    $('.portal ins.adsbygoogle').css("top", "10px"); 
  }
  else {
    $('.portal ins.adsbygoogle').css("position", "static"); 
    $('.portal ins.adsbygoogle').css("top", "auto"); 
  }
});