I'm using twitter bootstrap modal and sometimes after I close this modal, the window (body) keeps in a gray background... (same color as the modal's open background)
PS: In my application, i'm using a navbar too, and everytime I change the nav tab and then click on the button to open the modal, the modal's background gets darker than it was before!!
Does anybody here knows what can I do to have a normal background's modal? And when I close it, make it come back to the normal color?
Thank you!!
@peterdotjs,
I'm a new developer, so I don't know yet how to check the console for errors...
But I found out the solution, I just added $('.modal-backdrop').remove();
on the closing jQuery method, which is now like:
$("#btn").click(
function() {
$('#myModalClient').modal('hide');
$('.modal-backdrop').remove(); //it removes the modal back-drop
}
);
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.