You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository has been archived by the owner on Jun 18, 2022. It is now read-only.
Hi- nice plugin! It works well, but I noticed that if the top margin of the menu changes (ie something above the element in the DOM slides larger) the topMargin of the menu doesn't update accordingly, which can cause the menu to overlap elements above it. I believe the fix would be to check and see if the menu's initial y position has changed prior to this line:
if(vartop < varscroll + topMargin){
Maybe something like this (didn't test this):
var morePadding = 0;
//If the initial y position of the menu is now less than the y position of the menu
if (initial_y < current_y) {
//give more padding to the margin before adding the isStuck class
morePadding = current_y - initial_y;
}
if (vartop < varscroll + topMargin + morePadding) {
The only problem with the above approach is that it doesn't take into account the changing y position of the menu as you scroll down the page.
The text was updated successfully, but these errors were encountered:
Sign up for freeto subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Hi- nice plugin! It works well, but I noticed that if the top margin of the menu changes (ie something above the element in the DOM slides larger) the topMargin of the menu doesn't update accordingly, which can cause the menu to overlap elements above it. I believe the fix would be to check and see if the menu's initial y position has changed prior to this line:
Maybe something like this (didn't test this):
The only problem with the above approach is that it doesn't take into account the changing y position of the menu as you scroll down the page.
The text was updated successfully, but these errors were encountered: