Reputation: 3896
I have an black overlay that's going over the page, however it always seems to end at the viewport bottom of the browser, not the bottom of the page.
I'm using
$(document).height();
This is being called AFTER $(document).ready() Which is consoling 1115 on my page, but in reality the page goes as high as 1200.
I've tried, window, innerHeight. All are reporting the same.
I have a feeling it's not waiting for an image to load, which is high. But, not sure a way round if that is the case.
Upvotes: 0
Views: 225
Reputation: 66663
Do it inside $(window).load()
instead of $(document).ready()
See this link
Upvotes: 3