Window methods, as those to get the size or a better onload.
Moo.js, Function.js, String.js
Valerio Proietti, http://mad4milk.net
MIT-style license.
Window.js | Window methods, as those to get the size or a better onload. |
Window | Cross browser methods to get the window size, onDomReady method. |
Properties | |
disableImageCache | Disables background image chache for internex explorer, to prevent flickering. |
getWidth | Returns an integer representing the width of the browser. |
getHeight | Returns an integer representing the height of the browser. |
getScrollHeight | Returns an integer representing the scrollHeight of the window. |
getScrollWidth | Returns an integer representing the scrollWidth of the window. |
getScrollTop | Returns an integer representing the scrollTop of the window (the number of pixels the window has scrolled from the top). |
getScrollLeft | Returns an integer representing the scrollLeft of the window (the number of pixels the window has scrolled from the left). |
onDomReady | Executes the passed in function when the DOM is ready (when the document tree has loaded, not waiting for images). |
Cross browser methods to get the window size, onDomReady method.
Properties | |
disableImageCache | Disables background image chache for internex explorer, to prevent flickering. |
getWidth | Returns an integer representing the width of the browser. |
getHeight | Returns an integer representing the height of the browser. |
getScrollHeight | Returns an integer representing the scrollHeight of the window. |
getScrollWidth | Returns an integer representing the scrollWidth of the window. |
getScrollTop | Returns an integer representing the scrollTop of the window (the number of pixels the window has scrolled from the top). |
getScrollLeft | Returns an integer representing the scrollLeft of the window (the number of pixels the window has scrolled from the left). |
onDomReady | Executes the passed in function when the DOM is ready (when the document tree has loaded, not waiting for images). |
Disables background image chache for internex explorer, to prevent flickering. To be called if you have effects with background images, and they flicker.
Window.disableImageCache();
Returns an integer representing the scrollHeight of the window.
http://developer.mozilla.org- /en- /docs- /DOM:element.scrollHeight
Returns an integer representing the scrollWidth of the window.
http://developer.mozilla.org- /en- /docs- /DOM:element.scrollWidth
Returns an integer representing the scrollTop of the window (the number of pixels the window has scrolled from the top).
http://developer.mozilla.org- /en- /docs- /DOM:element.scrollTop
Returns an integer representing the scrollLeft of the window (the number of pixels the window has scrolled from the left).
http://developer.mozilla.org- /en- /docs- /DOM:element.scrollLeft
Executes the passed in function when the DOM is ready (when the document tree has loaded, not waiting for images).
© Dean Edwards/Matthias Miller/John Resig, remastered for mootools. Later touched up by Christophe Beyls http://digitalia.be.
init | the function to execute when the DOM is ready |
Window.onDomReady(function(){alert('the dom is ready');});