how to show modal from javascript which has data code example
Example: jquery modal on show + target button
$('#delete-file-modal').on('show.bs.modal', function (event) {
console.log(event.relatedTarget);
});
$('#delete-file-modal').on('show.bs.modal', function (event) {
console.log(event.relatedTarget);
});