Close Bootstrap's modal with AJAX

If you read further down the documentation:

$('#myModal').modal('hide')

Just get the ID of the modal, and replace myModal with it. Then place it in the AJAX success handler and there you have it.


You can use this script to close the modal

<button type="button" id="close_btn" class="close" data-dismiss="modal" aria-hidden="true">
    <i class = "icons-office-52"></i> 
</button> 
    $("#close_btn").trigger("click");

or

$('#my_model').modal('hide');