bootstrap 4 modal show automatically code example
Example 1: programmatically show modal boostrap
$('#myModal').modal('show');
Example 2: bootstrap 4 modal popup remote url
$('body').on('click', '[data-toggle="modal"]', function(){
$($(this).data("target")+' .modal-body').load($(this).data("remote"));
});