link trigger modal javascript code example
Example 1: jquery modal on show + target button
$('#delete-file-modal').on('show.bs.modal', function (event) {
console.log(event.relatedTarget);
});
Example 2: jquery display modal bs4
$('a[href$="#Modal"]').on( "click", function() {
$('#Modal').modal('show');
});