Reputation: 507
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!!
Upvotes: 0
Views: 725
Reputation: 507
@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
}
);
Upvotes: 1