Assuming I insert anything in my DOM with jQuery, like so:
$('#someselector').prepend('<img src="/img/myimage.gif" id="someid" />');
Is there a way in jQuery to get a jQuery
object referencing this new image, without having to do an extra search like
var myImage = $('#someselector #someid');
???
You can try something like this:
Or if there's only one img:
Alternatively:
Make it into an jQuery object before prepending it:
Solution without creating a jQuery object before and without having an Id: