Scrollify
Scrollify copied to clipboard
Height or offset not properly set in WP
This is WordPress specific issue but since I am making a theme for users there will be many of them asking to fix it.
When admin is logged in the #wpadminbar
is enabled and the heights are off by 32px beacuse of the WP html 32px top margin.
I tried to play with offset , setting setHeights
to false but it is either off on first section or correct on first and off on all others.
See this please http://take.ms/4xMay
Any help is appreciated!
This is the issue https://github.com/lukehaas/Scrollify/blob/master/jquery.scrollify.js#L658
the first section position is not taking possible html top spacing margin/padding
if I do
heights[i] = parseInt($this.offset().top - 32);
the first section is scrolled to properly onload when WP admin bar is visible
@danyj hey dude, I managed to get this resolved by checking for the admin bar and applying the difference only if the admin bar is present.
Please review my screenshot and let me know if it works for you as well.