dojo query to get parents of all inputs
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?
How about:
dojo.query("tbody td:contains(input)").onclick()
The latest versions of Dojo have a module to extend dojo.query: traverse. It contains also parent function.
精彩评论