show modal when button pressed jquery code example
Example 1: jquery on modal show
$(window).on('shown.bs.modal', function() {
$('#code').modal('show');
alert('shown');
});
Example 2: jquery modal on show + target button
$('#delete-file-modal').on('show.bs.modal', function (event) {
console.log(event.relatedTarget);
});