When JavaScript is cool…

by jp on August 8, 2006

This is really cool especially for me old dhtml dude/today XSLT dude (and seems like AJAX dude tomorrow).

$(“ul#menu>li[ul] a.active”).toggle(function(){}

So, what is going on above? I am writing CSS selectors combined with XPath to target specific elements. Library that makes this all possible is called jQuery

XPath is a part of a part of it’s jQuery expression language together with CSS.
jQuery is really worth of checking out.

2 comments

Err, I think you are using CSS selectors in your example. XPath’s look like this:

/html/p/a/…

by Felix Geisendörfer on 26 August, 2006 at 1:27 pm. #

Yeah, good point, you are right that’s mainly css selectors except li[ul] part.

by jp on 26 August, 2006 at 4:03 pm. #