I have the following piece of javascript that switches between two bootstrap modals.
However, when the second modal appears, the Bootstrap class "modal-open" that gets attached to the body class when a modal is opened is not being added onto the second modal. And so the modal background then scrolls instead of the modal itself.
The fix I need to do is to add the class of "modal-open" to the body tag when the second #priorityModal is opened.
Can someone tell me how to add it to the below code?
function showDialog2() {
$("#developmentModal").modal("hide");
$("#priorityModal").modal("show");
}
$("#toggledevelopmentModal").on("click", function () {
showDialog2();
});