tags:

views:

136

answers:

2

I'm used to the jQuery style of selecting, which would be fairly easy in this case

$("tbody td:has(input)").click(...);

But dojo seems to be using only regular CSS selectors, which means I can't get a parent element.
I've tried to do this:

dojo.query("tbody td input").parentNode.onclick(...);

But that doesn't seem to work. Any ideas?

+3  A: 

How about:

dojo.query("tbody td:contains(input)").onclick()
jrburke
wow. I can't believe I didn't remember `:contains`.. thanks, man (:
peirix
A: 

The latest versions of Dojo have a module to extend dojo.query: traverse. It contains also parent function.

Maine