modal open by default html code example
Example 1: close bootstrap modal with javascript
$('#myModal').modal('hide');
Example 2: open bootstrap modal with javascript
$("#myModal").modal()
$('#myModal').modal('hide');
$("#myModal").modal()