SEARCH
0-9 A B C D E F G H I J K L M N O P Q R S T U V W X Y Z
Prev | Current Page 129 | Next

Jonathan Snook, Aaron Gustafson, Stuart Langridge, and Dan Webb

"Accelerated DOM Scripting with Ajax, APIs, and Libraries"

It not only improves your efficiency
at retrieving elements from the DOM but it also smoothes the bumps of manipulation and traversal
that tend to be inconsistent across browsers.
Many of today??™s popular libraries include some methods for working with the DOM,
including the capability to select nodes via CSS selectors and to move through a collection of
nodes using functions such as nextSibling() and previousSibling(). They often have conveniences
for inserting new elements into the DOM, which is a tiresome process at best.
81
C H A P T E R 4
Animation
Part of working with the DOM is handling animation. Being able to handle animation means
being able to read and modify several DOM properties, such as the style object and element
offsets. Animation is simply the manipulation of element properties over time. It??™s also a great
way to add interest to a page and can improve the usability of your site or application if used
appropriately. (You??™ll learn more about animation in Chapter 6.)
Application Conveniences
The desktop is slowly moving to the Web with applications such as Google Docs and Spreadsheets,
and Google Mail. With these types of applications you are working not only with the
DOM but also with large data sets. JavaScript has some basic mechanisms, including arrays
and simple iteration, for handling data sets. However, larger data sets often require filtering
and ways to quickly load that data into the DOM.


Pages:
117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141