cssQuery is a javascript library that provides an easy way to access DOM elements, without the need for focusing too much on transversing the document’s elements. More developers are more adept in CSS than in Javascript, making this a useful tool for those fairly proficient in CSS. cssQuery may be considered similar to jQuery and Behaviour, which somehow change the way we approach browser scripting.
Using cssQuery, you can now use common CSS selectors like body > p
instead of getElementsById()
or getElementsByTagName()
. The downside would be the library’s size, though that is slowly becoming less of a consideration as broadband rapidly becomes widespread.