javascript on show modal code example
Example 1: call function on modal open
$('#myModal').on('shown.bs.modal', function (e) {
// do something...
})
Example 2: jquery modal on show + target button
$('#delete-file-modal').on('show.bs.modal', function (event) {
console.log(event.relatedTarget);
});