- $() is short-hand for document.getElementById()
- $$() allows you to use CSS-style selectors to get a list of matching XHTML elements
- the .setStyle() function allows you to set styles of any Element
- create "event observers" to detect page loads, mouseover events, mouseout events, and click events on any element
- The functions .addClassName() and .removeClassName() allow you to add and remove class names from any element. This example also shows how to use event observers.
- Using the .cumulativeOffset() function of any element gives you its exact position (in pixels) on the page
- Using the .getDimensions() function of any element gives you its exact width and height in pixels
Saturday, October 18, 2008
Basic Prototype.js Examples
Subscribe to:
Post Comments (Atom)
No comments:
Post a Comment