[jquery] return the inserted element
- by Quamis
Hello, i'm pretty new to jquery. I'm trying to insert an element to the DOM, and get that element back in my script.
Ex:
var elem = $("body").append("");
$(elem).show();
but it seems that .append returns the whole jQuery object..
am i supposed to use an ID for the inserted element and always reference it by it?? i really hope that there is a smarter move here.
I'm used to do it like that from Prototype..