I am trying to execute a piece of jQuery on a particular page in Appery. It is a little bit of logic to toggle the visibility of the footer depending on which way the user scrolls (like facebook's filtering footer navbar)
However, the logic is working on other pages than specified in the load event. (I only want this to work on the page I defined it in on Load).
How do I fix this?
Code:
$(window).on({
scrollstop: function() {
var st = $(this).scrollTop();
if (st = windowHeight){
Appery('mobilefooter').hide();
} else {
Appery('mobilefooter').show();
}
windowHeight = st;
cache.windowHeight = st;
}
});
Is there a way to target the specific window? $(this)?