javascript - .keyup event not working -


$('input[name="list_checkbox_ids[]"], #frame, input[name="del_list_ids[]"]').on('keyup', function() {    $('#button_link').prop('disabled', ! $('input[name="list_checkbox_ids[]"]:checked').length); }); 

the scenario is, click on search button generates list of checkboxes. button_link should defaulted disabled until select 1 of checkboxes. in above code, howcome not remove disabled? tried looking errors in console cannot find one. pls help.

list_checkbox_ids dynamically loaded on page.

can change

this

$('input[name="list_checkbox_ids[]"], #frame, input[name="del_list_ids[]"]').on('keyup', function() {    $('#button_link').prop('disabled', !$('input[name="list_checkbox_ids[]"]:checked').length);  }); 

into this(using event delegation) dynamically created content

 $(document).on('keyup','input[name="list_checkbox_ids[]"], #frame, input[name="del_list_ids[]"]', function() {    $('#button_link').prop('disabled', !$('input[name="list_checkbox_ids[]"]:checked').length);  }); 

Comments

Popular posts from this blog

android - MPAndroidChart - How to add Annotations or images to the chart -

javascript - Add class to another page attribute using URL id - Jquery -

firefox - Where is 'webgl.osmesalib' parameter? -