I have something like this:
//html
<div class="panel">
<div class="tools">
<a href="#action1">Action 1</a>
<a href="#action1">Action 1</a>
<a href="#action1">Action 1</a>
</div>
<div class="list">
<table>...</table>
</div>
</div>
//JavaScript (jQuery)
var lookup = $('.panel'),
buttons = lookup.find('.tools').detach().find('a');
...
//append buttons somewhere
So, here i have '.tools'
detached from '.panel'
and then i took buttons and append them somewhere else. But what about '.tools'
node? Does it beeing garbage-collected or not? Do I have to save detached '.tools'
, take buttons from it and than destroy it?
If its matter - html part is received via AJAX request and all this code is inside success
handler.