Toggle menu
Toggle personal menu
Not logged in
Your IP address will be publicly visible if you make any edits.
(Created page with "$(document).ready(function() { var nav = $('#mw-panel'); // Select the sidebar panel or modify as needed $(window).scroll(function() { if ($(this).scrollTop() > 100) { nav.addClass('sticky'); } else { nav.removeClass('sticky'); } }); }); $(document).ready(function() { $('#p-navigation ul').addClass('dropdown'); // Select the navigation bar });")
 
No edit summary
Line 1: Line 1:
$(document).ready(function() {
$(document).ready(function() {
var nav = $('#mw-panel'); // Select the sidebar panel or modify as needed
var nav = $('#mw-panel'); // Select sidebar panel or header for sticky behavior
$(window).scroll(function() {
$(window).scroll(function() {
if ($(this).scrollTop() > 100) {
if ($(this).scrollTop() > 100) {
Line 8: Line 8:
}
}
});
});
});

$(document).ready(function() {
$('#p-navigation ul').addClass('dropdown'); // Select the navigation bar
});
});

Revision as of 15:44, 21 October 2024

$(document).ready(function() {
  var nav = $('#mw-panel'); // Select sidebar panel or header for sticky behavior
  $(window).scroll(function() {
    if ($(this).scrollTop() > 100) {
      nav.addClass('sticky');
    } else {
      nav.removeClass('sticky');
    }
  });
});