MediaWiki:Nookipedia-timeless.js
From Nookipedia, the Animal Crossing wiki
Revision as of 00:46, May 15, 2021 by SuperHamster (talk | contribs) (On desktop, display text logo once user scrolls down)
Note: After saving, you may have to bypass your browser's cache to see the changes.
- Firefox / Safari: Hold Shift while clicking Reload, or press either Ctrl-F5 or Ctrl-R (⌘-R on a Mac)
- Google Chrome: Press Ctrl-Shift-R (⌘-Shift-R on a Mac)
- Internet Explorer / Edge: Hold Ctrl while clicking Refresh, or press Ctrl-F5
- Opera: Go to Menu → Settings (Opera → Preferences on a Mac) and then to Privacy & security → Clear browsing data → Cached images and files.
/* Any JavaScript here will be loaded for users using the Timeless skin */
/* On desktop, display text logo once user scrolls down */
$(document).ready(function() {
function toggleTextLogo() {
if ($(window).width() > 1099) {
if ($(window).scrollTop() > 100) {
$('#p-logo-text').fadeIn();
} else {
$('#p-logo-text').fadeOut();
}
} else {
$('#p-logo-text').fadeIn();
}
}
$(window).scroll(toggleTextLogo);
$(window).resize(toggleTextLogo);
});