colinramsay.co.uk

CssQuery

19 Sep 2005

I've seen a couple of these scripts around (notably Simon WIllison's version) but knowing the quality of work Dean Edwards has produced, I'll give this a shot. It's a javascript function which lets you select elements using CSS selectors. It'll return a javascript array of matching elements.

I've been using this technique lately to get elements which don't have a known ID until they've been processed by server side code.