dojo query does not work on IE7 but does on IE8 and other browsers?
dojo.query("#foo #bar")
which works as expected in FF, Safari, Chrome and IE8, returns an empty list in IE7.
I'm actually searching for a div with id = bar
inside another div with开发者_StackOverflow id = foo
.
Thanks Jeff
Because ID's are unique you shouldn't ever had to query for two at once. So either modify your query and have a single ID, or, if you need multiple elements with the same 'id', use a class.
For the second option, you would then change your query to dojo.query('.bar', dojo.byId('foo'))
, which returns elements with class 'bar' that are a child of the element with id 'foo'.
精彩评论