i got a question (i guess it is really simple but i really can't find it cause it's really specific).
I'd like to find how to use selector on a Jquery Object representing a DOM element.
Here is an exemple of what i want to do.
HTML:
<div id="template">
<button class="buttonRemove"></button>
...A Lot of other HTML Content...
</div>
JQuery:
var myTemplate = $("#template").clone(true);
myTemplate.attr("id","a_new_customized_id");
myTemplate.A_WAY_TO_SELECT_BUTTON_WITH_CLASS_REMOVE.hide();
I'd like to do that cause of two reason : I'm using my real template for some differents functions (Like Showing informations that can be delete, and some others that can't)
Thx !
EDIT: Thx everyone for your responses. I tried a lot of thing like "$.myTemplate.("selector")" before you gave me the solution.
I just found an other solution that is :
$('#buttonRemove',myTemplate)
If you use a 2nd parameter in the selector method, it will be use as the domain of research for the selector. (Default : document)