Page jumps when sticky bar appears
-
Useful plugin, potentially. But… I’ve deactivated the plugin. Maybe will delete it, actually.
It has nice features… but there’s a major problem:
The page jumps when the sticky menu bar appears. So no matter how nice everything looks, and how many technical things are in place, the plugin is useless if the user experience is to always see a big jarring jump each time the menu bar changes state.
Maybe I’m wrong, but I believe this a typical problem/solution. When the menu element becomes sticky, you’re changing it from position:relative to position:fixed (or something other than relative). This removes the bar from the relative page flow, thus jumping the page upwards, jarringly. On page load, you could get the original menu bar height in pixels, and when the menu bar changes state (e.g. becomes sticky) apply the pixel height to the pages’ top-padding or to some dummy spacer. In theory this way you cancel-out any page jumping.
thx
- The topic ‘Page jumps when sticky bar appears’ is closed to new replies.