I have the following code on the “masterPage.js” for my site so that it would function on all of my site pages. What it does is shrink my site’s menu in the header of the site as you scroll down. I have the “columnStrip22” shown on all pages, also ensuring that the code will function on every page. However, the code only works when you first load the site, and stops working once you go to another site page.
$w.onReady(function () {
$w("#columnStrip22").onViewportLeave(() => {
$w("#stripsmall").show();
$w("#bigstrip").hide();
})
$w("#columnStrip22").onViewportEnter(() => {
$w("#bigstrip").show();
$w("#stripsmall").hide();
})
});
Please let me know what the problem may be. Thanks for the help!