I am utilizing Bootstrap v3.1.1 to showcase a modal popup on one of my web pages. The following code shows how I have implemented it.
<!--Start show add student popup here -->
<div class="modal fade" id="add-student" tabindex="-1" role="dialog" aria-labelledby="myModalLabel">
<div class="modal-dialog" role="document">
<div id="divStudentPopUp"></div>
</div>
</div>
<!--End show add student popup here -->
<!-- JS Code Goes Here -->
//--- Add Student POP Up Script-- Start
$('#add-student').modal('toggle');
$('#add-student').modal('show');
$('#add-student').modal('hide');
//--- Add Student POP Up Script-- End
<!-- END -->
The text content is dynamically added through an AJAX call when the modal popup is displayed. There are two buttons on it - SAVE and CANCEL.
<!-- HTML for Cancel button -->
<button class="hvr-ripple-out btn btn-red cancel" data-dismiss="modal" id="btnCancelStudent">Cancel</button>
The issue arises when clicking the CANCEL button as the modal closes but the main window (body) scroll does not work.
Thank you in advance!