So, I'm using this code to open another modal window in a current opened modal window:
<a onclick=\"$('#login').modal('hide');$('#lost').modal('show');\" href='#'>Click</a>
What happens is, that for like 500ms the scrollbar will duplicate. I guess because the current modal is still fading out. However it looks very un-smooth and stuttering.
I would appreciate any suggestions to solve this issue.
Also, is the way building this in an onclick-event unprofessional?
I'm working with the bootstrap version 3.0.
Edit: I guess it's neccesary to reduce the time of fading out a modal. How is this possible?
To open a modal from another modal can be done simply by using the events that Bootstrap provides such as show. bs. modal . You may also want some CSS to handle the backdrop overlays.
To open another modal in modal with Bootstrap, we can set the z-index of the modals. to add the modals. so the 2nd modal will show on top of the first one.
Try setting the z-index of the popup wrapper you want above greater than the other.. This is provided that #popup1 and #popup2 have the same parent. Show activity on this post. set the z-index of popup which should be on the top, highest than any other element on the DOM.
data-dismiss
makes the current modal window force close
data-toggle
opens up a new modal with the href
content inside it
<a data-dismiss="modal" data-toggle="modal" href="#lost">Click</a>
or
<a data-dismiss="modal" onclick="call the new div here">Click</a>
do let us know if it works.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With