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
$(document).ready(function() { $("#button").click(function() { $('#mymodal').on('shown.bs.modal', function() { $('#myinput').focus(); }) }); });
It is "#button" that calls the modal form,
"#mymodal" is the modal form,
"#myinput" is the input you want to get focus