having for example
<div>
<a>anything....</a>
</div>
set event handler:
$("div a").click(.....)
while using later $("div").html('') event handler for <div><a> get lost.
Is there any way to do this job – clean content – and let handlers exists?
You could delegate the handler to something higher up the DOM, like the
<body>: