Using jQuery I can do something like this:
var x = $('#hello');
x = x.add('#bye');
This way I have both #hello and #bye elements in the query set called x. Is there a similar function in Dojo?
Using jQuery I can do something like this:
var x = $('#hello');
x = x.add('#bye');
This way I have both #hello and #bye elements in the query set called x. Is there a similar function in Dojo?
I think you're looking for adopt
- http://api.dojotoolkit.org/jsdoc/1.3.2/dojo.NodeList.adopt
var x = dojo.query('#hello');
x = x.adopt('#bye');
I don't think there is directly, but the following should work:
var x = dojo.query('#hello');
x = x.concat(dojo.query('#bye'));
Then x[0] would be #hello. x[1] would be #bye.