Dynamic Objects
Powerful as CSS is, it isn’t really a language, as shown by the recipes in this book having to repeat large chunks of code where only a minor change is required between each, such as a color or width. A language, on the other hand, is very good at repeating things based on only a few lines of code. And that’s where JavaScript fits in, because with it you can bring the dynamic interaction of a web page up an order of magnitude.
What’s more, many of the classes in this chapter allow you to enter values as parameters to create exactly the result you want, including moving objects about in the browser, loading images in ...

Get Web Developer's Cookbook now with O’Reilly online learning.

O’Reilly members experience live online training, plus books, videos, and digital content from 200+ publishers.