Can I do
<div class="some_div">some div</div>
<script>
jQuery('.some_div').data('some_data','some info').remove();
</script>
where the information is added with data’s method, is still around the DOM? Do I need to uninitialize? Is the information automatically removed when the div element has no references left?
The data is stored in a variable available to the jQuery objects via closure. It is never stored in the dom. Remove method deletes the data along with the DOM element.
source: jQuery API: remove()