Hello,
I am adding javascript to the customizer (developing on my local server using MAMP), and although it works successfully on the page I have opened the customizer for, it does not work across the site. The code I am using is:
var yourNavigation = $("#stickymenu");
stickyDiv = “fixedmenu”;
yourHeader = $(’#hero’).height();
$(window).scroll(function() {
if( $(this).scrollTop() > yourHeader ) {
yourNavigation.addClass(stickyDiv);
} else {
yourNavigation.removeClass(stickyDiv);
}
});
Am I entering this in the wrong place? Currently I am putting it in Customise > Custom > Global Javascript.
Regards,
Alex