Hi Gals and Guys,
In case some of you were experiencing problems with the Frozen Header example not working when you open it in the editor or follow the video instructions, please re-check the example link here and open the example in the editor.
The Problem - onVIewport events are not triggering on the sticky header anymore how to fix? - like the up to date example, add an anchor or a transparent strip below the header and change the onViewPort events from the header to the new strip
When I was trying to find an answer to this exact issue, I couldn’t find this (and when someone pointed it out to me I was able to fix the issue very quickly!)
When I was searching for answers I looked through the forum for “onViewportEnter” and “onViewportLeave”, so maybe by putting that here in this comment it’ll help someone find this more quickly.
Upon further investigation, it would appear that the onviewportenter and onviewportleave code works when using the clearstrip method on many computers, however, the same code fails using my Lenovo X1 Yoga. It might have something to do with the fact that the X1 can be used in table mode. Perhaps the onviewport function works on some devices and not others. My own investigation was on various computers and laptops using chrome.
I have a similar code using a frozen header and I can’t seem to fix it.
My issue is that my code works on editor preview BUT it doesn’t work on the published site. I’ve replaced my code to be more inline with the link posted in the original post above but I’m still having the same issue.
Hi Guys,
Can you try setting the location of the clearstrip in the mobile version editor? If the site ia being rendered in an enough smaller size it might load the mobule version which needs readjustment.
If that doesnt work, can you please share the link to your sites so I can check?
It’s working now! I must have misspelled something when I changed my original code to look more like yours. I left it for a bit, came back to write it again and wala! My changing onscroll menu is working perfectly now! Thank you Lior!