Why didn't on.click work on the element in bootstrap modal?

HTML:

<input type="radio" ng-model="idCV" name="file" value="" required> 

Jquery:

 $(function(){ $('input[type="radio"]').on('click', function(){ alert('f'); }); }); 

    1 answer 1

    Possibly, the modal content is loaded by ajax.

     $(function(){ $(document).on('click', 'input[type="radio"]', function(){ alert('f'); }); });