Monday, February 11th, 2008
David Smith of WebKit posted about their native implementation of querySelector and querySelectorAll from the W3C Selectors API.
Native CSS selectors in the browsers is going to be a huge boon for us and the Ajax libraries that will be able to use them.
You can use the standard via:
- * Get all the elements with class "hot" (duplicating getElementsByClassName)
- * A common use for this is as a toggle;
- * for example, a search feature might tag results with a class
- * Get the currently hovered element
- * Get every other element in the <li> with id "large"
- * This is mostly useful for doing "zebra stripe" alternating rows.
- * Once CSS3 becomes more widespread, doing this directly via CSS will be more practical
Posted by Dion Almaer at 7:08 am