What is the best way to hang an event handler and why? In the HTML tag for example
<div onclick="deleteProsto()" id="prosto_button">i prosto</div> or hang in js itself, you need to be sure that the element is there and dynamically when an element is created you have to hang an event on its parent
document.getElementById('prosto_button').click(function(){ return false; }); How are the pitfalls in terms of readability performance, etc.?
$('body').on('click', '.class_or_#id', function(e){});- SergeyE