Difference between revisions of "MediaWiki:Vector.js"

From TerraFirmaCraft Wiki
Jump to: navigation, search
(Created page with "Any JavaScript here will be loaded for users using the Vector skin: // Cache selectors outside callback for performance. var $window = $(window), $stickyEl...")
 
(Revert)
 
(2 intermediate revisions by the same user not shown)
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 */
 
  // Cache selectors outside callback for performance.
 
  var $window = $(window),
 
      $stickyEl = $('#the-sticky-div'),
 
      elTop = $stickyEl.offset().top;
 
 
  $window.scroll(function() {
 
        $stickyEl.toggleClass('sticky', $window.scrollTop() > elTop);
 
    });
 

Latest revision as of 00:10, 21 July 2016

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