This site is a developmental version of Wiki Law School. To go to the production site: www.wikilawschool.org

MediaWiki:Common.js: Difference between revisions

From wikilawschool.net. Wiki Law School does not provide legal advice. For educational purposes only.
m (Protected "MediaWiki:Common.js" ([Edit=Allow only administrators] (indefinite) [Move=Allow only administrators] (indefinite)))
No edit summary
Line 5: Line 5:
   var y = $(this).scrollTop();
   var y = $(this).scrollTop();
   if (y > 800) {
   if (y > 800) {
     $('.skip-to-top-button').fadeIn();
     $('#skip-to-top-button').fadeIn();
   } else {
   } else {
     $('.skip-to-top-button').fadeOut();
     $('#skip-to-top-button').fadeOut();
   }
   }
});
});

Revision as of 02:24, June 1, 2020

/* Any JavaScript here will be loaded for all users on every page load. */

/* Enable Template:Skip to top button to fade out */
$(document).scroll(function() {
  var y = $(this).scrollTop();
  if (y > 800) {
    $('#skip-to-top-button').fadeIn();
  } else {
    $('#skip-to-top-button').fadeOut();
  }
});