onclick hide modal code example
Example 1: bootstrap 4 hide modal via javascript
$('#myModal').modal('hide')
Example 2: lity open modal hide close button
$('.lity-close').remove();
$('#myModal').modal('hide')
$('.lity-close').remove();