> I'm using event delegation (http://www.danwebb.net/2008/2/8/event- > delegation-made-easy-in-jquery) to capture events that have bubbled up > to the #nav element. It might even make sense to capture clicks that > bubble up to the document object. I want to use the .is function to > figure out what the user clicked on. Can I pass selector expressions > like "div div#nav a.exit" to the .is function?
You could do: if ( $("div div#nav a.exit").index( e.target ) > -1 ) { } This way you could even cache the query in a variable to avoid repeat calls. --John