This function can take a variable number of arguments, each one indicating a tag property within the tag's object. It is followed by a dot-delimited property value and basically provides a way to modify the same property across a large number of objects in a single call.
This could be a quite useful function for a variety of other non-style-related cases. You may want to experiment and see whether, in your browser, the contextual() method is useful. However, it may only be present in Netscape browsers, thus limiting its usefulness for deployment.
When used in a JSS context, this is more or less equivalent to H1 P { color: red }.
// Set the color property for several objects at once. contextual(tags.P, tags.H1).color = "red";
See also: | JavaScript Style Sheets |
Prev | Home | Next |
Content Model | Up | continue |
JavaScript Programmer's Reference, Cliff Wootton Wrox Press (www.wrox.com) Join the Wrox JavaScript forum at p2p.wrox.com Please report problems to support@wrox.com © 2001 Wrox Press. All Rights Reserved. Terms and conditions. |