July 2011
Intermediate to advanced
276 pages
5h 11m
English
In this recipe, we'll see how to use one style declaration phrase to alter any group of selected elements.
When a group of elements must have borders, we can style them all with just one call. Just as we apply styles to a single element through the Element.setStyle() and Element.setStyles() methods, our groups of elements can be styled just as easily.
This example demonstrates the changing of a single property with setStyle() as well as the changing of multiple style properties with the setStyles() method.
<script type="text/javascript" src="mootools-1.3.0.js"></script> </head> <body> <form action="javascript:" method="get"> <input id="go_bold" type="button" value="Set Borders ...