Currently, I am utilizing bootbox for my project and have encountered an issue. I have a button within my modal that, when clicked, should open another modal. However, the problem is that the background behind the two modals does not dim properly; instead, it just becomes darker. How can I resolve this issue?
Below is a snippet of my code for reference:
$('#new-btn').click(function () {
new_room_form = bootbox.dialog({
title: "New room",
message:
'<div class="row">' +
'<div class="col-md-12">' +
'<form>' +
'<fieldset style="padding: 20px">' +
'<legend>Example:</legend>' +
'<div class="form-group">' +
'<button class="btn btn-primary" id="add">Add</button>' +
'</div>' +
'</fieldset>' +
'</form>' +
'</div>' +
'</div>',
buttons: {
cancel: {
label: "Cancel",
className: "btn btn-default"
},
add: {
label: "Add",
className: "btn btn-primary",
}
}
}); // end bootbox dialog
$('#add').on('click', function(response) {
bootbox.alert("Hello world!", function() {
});
return false;
});
});