For example, ideally I'd like to go:
newelement = myElement.query('whatever');
Basically how mootools does this:
element = oldemement.getElement('whatever');
What the equivalent in dojo? If it makes a different, I am using this in a drag and drop creator function:
function myCreator( item, hint ) {
console.log(item);
var a = dojo.query('.name', item)
console.log(a);
var myDiv = dojo.create( 'table', { innerHTML: item.name });
if (hint == 'avatar') myDiv.innerHTML = 'Im an avator of ' + item.name;
return {node: myDiv, data: item, type: item.type};
}
dojo.addOnLoad( function() {
new dojo.dnd.Source("categoryTable", {creator: myCreator });
...
Log of item returns:
<td><span class="dojoDndHandle">::</span></td>
<td><input type="hidden" name="category_8" value="0"><input type="checkbox" name="category_8" id="category_8" value="1"></td>
<td class="name"><a href="/news/admin/editCategory/8">Category A</a></td>
<td><span title="18:57:11 04/07/2010">3 days ago</span><br>By <a href="/user/1/">Ashley</a></td>
1 day ago
By Ashley