On 7 March 2012 16:51, Adam D. Ruppe <destructiona...@gmail.com> wrote: > On Wednesday, 7 March 2012 at 03:46:45 UTC, James Miller wrote: >> >> However, I would like jQuery's CSS selector engine as a standalone >> library, sooo much easier than complex DOM lookups > > > CSS selector is built into all the browsers since IE8/FF3.5. > The functions are element.querySelector and > element.querySelectorAll. > > http://msdn.microsoft.com/en-us/library/cc304119%28v=VS.85%29.aspx > https://developer.mozilla.org/En/DOM/Document.querySelector > > > If you need to support older browsers, I think jquery's > engine is called Sizzle stand alone, but I just let it > throw the method not found exception, and carry on without > the javascript. It's not worth the size.
Oh right, I didn't know that, IE8 and FF3.5 are old enough that you can use it without too much worry, older browsers can just have some graceful fallback. -- James Miller