javascript - Click handler not getting invoked after html write -
i've code:
document.getelementbyid('form1').innerhtml = user_selections.stockyard_html[sel]; alert('click handler registered'); $("#" + register_btn_id).click(function (event){ alert("clicked"); });
after html overwrite of form html saved yesterday, there register button click i'm not able catch. reason?
put inside document ready:
$(function() { $("#" + register_btn_id).on('click', function(e) { alert('clicked') )} })
Comments
Post a Comment