close modal button code example
Example 1: javascript modal close
$('#closemodal').click(function() {
$('#modalwindow').modal('hide');
});
Example 2: close bootstrap modal with javascript
$('#myModal').modal('hide');
Example 3: bootstrap modal popup
<button type="button" class="btn btn-info btn-lg" data-toggle="modal" data-target="#myModal">Open Modal</button>
<!-- Modal -->
<div id="myModal" class="modal fade" role="dialog">
<div class="modal-dialog">
<!-- Modal content-->
<div class="modal-content">
<div class="modal-header">
<button type="button" class="close" data-dismiss="modal">×</button>
<h4 class="modal-title">Modal Header</h4>
</div>
<div class="modal-body">
<p>Some text in the modal.</p>
</div>
<div class="modal-footer">
<button type="button" class="btn btn-default" data-dismiss="modal">Close</button>
</div>
</div>
</div>
</div>
Example 4: when modal close event
$("yourid").on('hide.bs.modal', function(){
});
Example 5: html data-target modal
$('#myModal').modal('show')