Skip to content

Instantly share code, notes, and snippets.

@Sean-Spallen
Created April 21, 2020 19:32
Show Gist options
  • Save Sean-Spallen/2959ceb2f153b806b7b0d5fe86b2695d to your computer and use it in GitHub Desktop.
Save Sean-Spallen/2959ceb2f153b806b7b0d5fe86b2695d to your computer and use it in GitHub Desktop.
Laravel Modals
$('#myModal').on('shown.bs.modal', function () {
$('#myInput').focus()
})
<!-- Modal -->
<div class="modal fade" id="myModal" tabindex="-1" role="dialog" aria-labelledby="myModalLabel">
<div class="modal-dialog" role="document">
<div class="modal-content">
<div class="modal-header">
<button type="button" class="close" data-dismiss="modal" aria-label="Close"><span aria-hidden="true">&times;</span></button>
<h4 class="modal-title" id="myModalLabel">Modal title</h4>
</div>
<div class="modal-body">
...
</div>
<div class="modal-footer">
<button type="button" class="btn btn-default" data-dismiss="modal">Close</button>
<button type="button" class="btn btn-primary">Save changes</button>
</div>
</div>
</div>
</div>
<a style="margin:12px 0px 18px;" data-toggle="modal" data-target="#myModal" class="btn btn-primary">New Technician</a>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment