I load a dynamic bootstrap modal and it contains few text inputs. The issue i face that i want the cursor to focus on the first input in this modal, and this is not happenin
The usual code (below) does not work for me:
$('#myModal').on('shown.bs.modal', function () { $('#myInput').focus() })
I found the solution:
$('body').on('shown.bs.modal', '#myModal', function () { $('input:visible:enabled:first', this).focus(); })
see more here