Take a look at the snippet below. Does it create a text node for the string "test" in the DOM? Can I select that node with jQuery for MooTools?
<div id="foobar">
test <img />
</div>
Take a look at the snippet below. Does it create a text node for the string "test" in the DOM? Can I select that node with jQuery for MooTools?
<div id="foobar">
test <img />
</div>
//plain
var node = document.getElementById('foobar').childNodes[0];
//jquery
$("foobar").contents().eq(0);
this will give you a textnode which will include the whitespace around the text too