I have the following HTML on a page:
<div class="component">
<a href="#" class="delete">delete</a>
</div>
And I have the following script at page load:
$(document).ready(function(){
$('a.delete').on('click', function() {
....
});
});
This page has other Javascript code that manipulates the page and removes via:
$('.component').remove();
My question: do I need to remove (unbind) the event handler before removing the HTML? If not, will there be any memory leak or other impact?
Thanks and regards!