Open laureljanej opened 8 years ago
I was able to solve this by resetting the inline styles on the fixed element after detaching ScrollToFixed. It'd be great if clearing the styles could be part of the native detach function because the inline styles continue to make the element sticky even after detaching the plugin.
$('#scroll_fixed').trigger('detach.ScrollToFixed');
$('#scroll_fixed').attr("style","");
Thanks for the great plugin!
I'm having an issue with the detach trigger not unfixing the sticky header when called. I'm calling it from a custom function because I'm calculating the height of submenus so that the header is fixed when the menu fits in the viewport but unfixed when the menu doesn't fit.
The detach trigger is called when the window is resized (and smaller than the height of the menus) but it doesn't unfix the header.
Here's my code: