I've "cached" a jQuery object that I use inside a loop called $myElement. I would like to use some native JavaScript functions on it (for better performance). However, my attempts below throws errors (the element is undefined). Is there any way to accomplish this?
$myElement.find('span')[0];
$myElement.find('span').get(0);
Update: What Im trying to do is something like:
$myElement.find('span')[0].innerHTML('some text');
That's giving me an error.
$myElement? Is thespanitself in there or a parent of it? If thespanis already in the object you could also usefilter(), which doesn't read the DOM but only the objects contents.