I' trying to use window.pageYOffset & window.scrollMaxY to calculate the current page progress. This approach works under FF3.5 but under webkit window.scrollMaxY is undefined.
+1
A:
I think you want window.scrollTop and window.scrollHeight for other browsers. window.scrollMaxY isn't supported by IE either.
Quirksmode.org is a great site for sussing out the differences in browser DOM implementations.
Andy E
2009-07-07 09:14:06
More info about scrollMaxY:- http://code.google.com/p/doctype/wiki/WindowScrollMaxYProperty
wai
2009-07-07 10:02:50
A:
I've got away with document.body.scrollHeight
so that
document.body.scrollHeight = window.pageYOffset + screen height in pixels
at the end of the page (on Android).
alex
2009-07-07 10:36:16
A:
Hi, alternative to window.scrollMaxY:
document.documentElement.scrollHeight - document.documentElement.clientHeight
gives same result as window.scrollMaxY with ie7, ie8, ff3.5, Safari 4, Opera 10, Google Chrome 3 under DOCTYPE XHTML 1.0 Transitional.
panos
2009-11-14 00:19:34