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
My solution does not require any additional CSS.
As pointed by @Orland, one event is still happening when the other starts. My solution is about starting the second event (showing the adminPanel
modal) only when the first one is finished (hiding the loginModal
modal).
You can accomplish that by attaching a listener to the hidden.bs.modal
event of your loginModal
modal like below:
$('#loginModal').on('hidden.bs.modal', function (event) {
$('#adminPanel').modal('show');
}
And, when necessary, just hide the loginModal
modal.
$('#loginModal').modal('hide');
Of couse you can implement your own logic inside the listener in order to decide to show or not the adminPanel
modal.
You can get more info about Bootstrap Modal Events here.
Good luck.