Hi there
I have a menu that when I scroll down the page it transforms and changes colour and position etc. Here is the javascript code I used to achieve this
jQuery(document).ready(function($) {
$(window).scroll(function() {
var scrollPos = $(window).scrollTop(),
navbar = $('.x-navbar');
if (scrollPos > 800) {
navbar.addClass('alt-color');
} else {
navbar.removeClass('alt-color');
}
});
});
The scroll position (800) on the home page is great, but on other pages it needs to be about 350-400. Is there a way of altering the code so that the scroll position can be changed on selected pages?
EDIT: Forgot to add my URL. The home page is - www.rjdesigns.website and an example of the selected page I want it changing on is www.http://rjdesigns.website/?page_id=176
Thanks