[jQuery] Return Object + Wrapper
I've got a bit of a problem. I'm attempting to wrap an element, and
then retrieve the element + the new element added on wrap. For
example:
$("element").wrap("div");
The wrap function will return $("element") again, but what if I want
to include the div I just wrapped around $("element") into a new
Jquery object?
The html used in the wrap() function is dynamic, it can be anything,
so I can't just select it by doing $("div element") after the wrap.
Any advice on the matter is *greatly* appreciated.