modal hide by js code example
Example 1: close bootstrap modal with javascript
$('#myModal').modal('hide');
Example 2: call modal by id href
<a href="!#" data-toggle="modal" data-target="#login">
</a>
$('#myModal').modal('hide');
<a href="!#" data-toggle="modal" data-target="#login">
</a>