Window.js

Window methods, as those to get the size or a better onload.

Dependencies

Moo.js, Function.js, String.js

Author

Valerio Proietti, http://mad4milk.net

License

MIT-style license.

Summary
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).

Window

Cross browser methods to get the window size, onDomReady method.

Summary
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).

Properties

disableImageCache

Disables background image chache for internex explorer, to prevent flickering.  To be called if you have effects with background images, and they flicker.

Example

Window.disableImageCache();

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.

See Also

http://developer.mozilla.org- /en- /docs- /DOM:element.scrollHeight

getScrollWidth

Returns an integer representing the scrollWidth of the window.

See Also

http://developer.mozilla.org- /en- /docs- /DOM:element.scrollWidth

getScrollTop

Returns an integer representing the scrollTop of the window (the number of pixels the window has scrolled from the top).

See Also

http://developer.mozilla.org- /en- /docs- /DOM:element.scrollTop

getScrollLeft

Returns an integer representing the scrollLeft of the window (the number of pixels the window has scrolled from the left).

See Also

http://developer.mozilla.org- /en- /docs- /DOM:element.scrollLeft

onDomReady

Executes the passed in function when the DOM is ready (when the document tree has loaded, not waiting for images).

Credits

© Dean Edwards/Matthias Miller/John Resig, remastered for mootools.  Later touched up by Christophe Beyls http://digitalia.be.

Arguments

init the function to execute when the DOM is ready

Example

Window.onDomReady(function(){alert('the dom is ready');});
My Object Oriented javascript.
Contains Function prototypes, utility functions and Chain.
Contains String prototypes and Number prototypes.