[Noisebridge WebDev] [FrontEnd] Class for 2013-08-26: ClassName Swap, Language Review, RTFM, by Garrett Smith
dhtmlkitchen at gmail.com
Tue Aug 27 22:58:02 UTC 2013
Class for 2013-08-26 (Monday): ClassName Swap, Language Review, RTFM,
by Garrett Smith
Lesson: CSS ClassName Swap
By changing an element's className multiple styles can be changed at one time.
Using the descendant selector, and changing the className of an
ancestor element, multiple elements can be updated simultaneously,
with a modicum of highly efficient code.
For Styles, replace a loop that applies styles to descendants by
adding a class token to the nearest common ancestor.
Also a brief review of ECMAScript and links to the FAQ and pertinent specs.
More information about the WebDev