I am using bootstrap and Parse framework to build a small webapp. But those Bootstrap modals keep adding padding-right to body after closed. How to solve this?
I tri
If you're more concerned about the padding-right related thing then you can do this
jQuery:
$('#loginModal').on('show.bs.modal', function (e) {
$('body').addClass('test');
});
this will addClass to your body and then using this
CSS:
.test[style] {
padding-right:0 !important;
}
and this will help you to get rid of padding-right.
But if you're also concerned about the hiding scroll then you've to add this too:
CSS:
.test.modal-open {
overflow: auto;
}
Here's the JSFiddle
Please have a look, it will do the trick for you.