Fixed Nav Stuck

Hi there,

I was given the following code from support a year ago so that when I made customizations to my fixed nav, it would revert back to the original nav when you scrolled back to the top of the page.

jQuery(function($) {

// On scroll
$(window).scroll(function(){
if( $(this).scrollTop() < 1 ) {
$(’.x-navbar’).removeClass(‘x-navbar-fixed-top’);
}
});

});

However, with the latest update the code is no longer working. I’ve attached my site so that you can see.

Hi there,

There are some JS errors in the console that might be causing the issue for the code not to work.

Did you update either X or Cornerstone recently? If so, kindly make sure to clear your site’s cache and the browser cache as well.

If you are still seeing an issue, please try testing for a plugin conflict. You can do this by deactivating all third party plugins, and seeing if the problem remains. If it’s fixed, you’ll know a plugin caused the problem, and you can narrow down which one by reactivating them one at a time.

Let us know how it goes!

This topic was automatically closed 10 days after the last reply. New replies are no longer allowed.