I’m trying to scroll the page 50px before body load. But it always waits for body load before running the code.
I’m not quite sure what’s the reason, I seem to remember running as they are parsed.
I tried with both, jquery and plain javascript, this is my code:
$(document).scrollTop('50');
window.scrollBy(0,50);
How do I make it work before body load?
there is no body when you are calling the event so nothing would happen
one way around to this is that set the height of body so some constant number
and add onLoad event on the body tag