Modal Windows And Binding/unbinding
I have a modal window that pops up when a 'Add New' is selected from the a dropdown. The user can type in a text field a new option to be added to the dropdown. It works fine as
Solution 1:
You need to bind the event handler to something that doesn't get replaced in the DOM, ie <body>
:
$(document.body).on('click', '#someElement', function() {
// do something
});
You could also bind to another parent tag that you know won't get replaced.
Post a Comment for "Modal Windows And Binding/unbinding"