jQuery - Dynamically added content - Radio on change function -
i using ajax load popup containing different settings, including button ("click" event) , radio buttons ("change" event).
while "click" event works fine, (using following function)
$("#my_popup").on("click", '.my_button', function() { "use strict"; // things });
... "change" event not. see corresponding function below:
$('#my_popup').on('change', 'input[name=input_name]:radio', function(){ "use strict"; if(condition) { // other things } else { // other things } });
any ideas how make work? according dynamic event binding rules in thread believe should working fine...
html:
<div id="my_popup"> <input id="radio_1" type="radio" name="input_name"> <input id="radio_2" type="radio" name="input_name"> <!-- [...] --> </div>
thanks in advance.
Comments
Post a Comment