Hello @Chris,
Thanks for writing in!
Please be informed that your JS code will only be applied when you scroll the page.
jQuery(function($) {
$(window).scroll(function(){
if($(window).scrollTop() > 0){
$('.x-navbar').removeClass('scroll-nav');
} else {
$('.x-navbar').addClass('scroll-nav');
}
});
});
If you want to include on page load, you will have to indicate it in your code as well. Perhaps you need to update the code and use this instead:
jQuery(function($) {
$(window).on('load scroll', function(){
if($(window).scrollTop() > 0){
$('.x-navbar').removeClass('scroll-nav');
} else {
$('.x-navbar').addClass('scroll-nav');
}
});
});
Please note that custom coding is outside the scope of our support. Issues that might arise from the use of custom code and further enhancements should be directed to a third party developer.
Best Regards.