Quantcast
Channel: Bootstrap: Open Another Modal in Modal - Stack Overflow
Browsing all 25 articles
Browse latest View live

Answer by ramin for Bootstrap: Open Another Modal in Modal

Maybe, not bad:<style>#modal2 .modal-content{box-shadow: 0 0 50px 10px #999 !important;}</style>

View Article



Answer by Ali Rasouli for Bootstrap: Open Another Modal in Modal

you can use this code to use even more than 2 modal(this sample use 3 modal): $('.modal').on('shown.bs.modal', function (e) { $('.modal.show').each(function (index) { $(this).css('z-index', 1101 +...

View Article

Answer by sat for Bootstrap: Open Another Modal in Modal

There will be a scrolling glitch if you don't close the 1st modal properly.Here is an example using Bootstrap 4HTML:<div class="modal fade" id="modal-1"><div class="modal-dialog"><div...

View Article

Answer by Vytenis Ščiukas for Bootstrap: Open Another Modal in Modal

This thread is old, but for those who come from google, Ive come with a solutions that is hybrid from all the answers Ive found on the net.This will make sure level class is being...

View Article

Answer by Rakesh Vadnal for Bootstrap: Open Another Modal in Modal

try this:$('.modal').on('hidden.bs.modal', function () {//If there are any visible if($(".modal:visible").length > 0) { //Slap the class on it (wait a moment for things to settle)...

View Article


Answer by Carlo for Bootstrap: Open Another Modal in Modal

Why not just change the content of the modal body? window.switchContent = function(myFile){ $('.modal-body').load(myFile); };In the modal just put a link or a button<a href="Javascript:...

View Article

Answer by Adam for Bootstrap: Open Another Modal in Modal

The answer given by H Dog is great, but this approach was actually giving me some modal flicker in Internet Explorer 11. Bootstrap will first hide the modal removing the 'modal-open' class, and then...

View Article

Answer by Carol Skelly for Bootstrap: Open Another Modal in Modal

Bootstrap 5 (beta) - update 2021The default z-index for modals has changed to 1060. Therefore, to override the modals and backdrop use...modal:nth-of-type(even) { z-index: 1062...

View Article


Answer by smartbloke for Bootstrap: Open Another Modal in Modal

For bootstrap 4, to expand on @helloroy's answer I used the following;-var modal_lv = 0 ;$('body').on('shown.bs.modal', function(e) { if ( modal_lv > 0 ) {...

View Article


Answer by Alex Sh. for Bootstrap: Open Another Modal in Modal

$(document).on('hidden.bs.modal', function (event) { if ($('.modal:visible').length) { $('body').addClass('modal-open'); }});

View Article

Answer by helloroy for Bootstrap: Open Another Modal in Modal

For someone who use bootstrap 4https://jsfiddle.net/helloroy/tmm9juoh/var modal_lv = 0;$('.modal').on('shown.bs.modal', function (e) { $('.modal-backdrop:last').css('zIndex',1051+modal_lv);...

View Article

Answer by RedDevil2015 for Bootstrap: Open Another Modal in Modal

Modals in Modal:$('.modal-child').on('show.bs.modal', function () { var modalParent = $(this).attr('data-modal-parent'); $(modalParent).css('opacity', 0);});$('.modal-child').on('hidden.bs.modal',...

View Article

Answer by Dylan Hayes for Bootstrap: Open Another Modal in Modal

I went kind of a different route all together, I decided to "De-Nest" them. Maybe someone will find this handy...var $m1 = $('#Modal1');var $innermodal = $m1.find(".modal"); //get reference to nested...

View Article


Answer by Abhishek for Bootstrap: Open Another Modal in Modal

Close the first Bootstrap modal and open the new modal dynamically.$('#Modal_One').modal('hide');setTimeout(function () { $('#Modal_New').modal({ backdrop: 'dynamic', keyboard: true });}, 500);

View Article

Answer by Christian for Bootstrap: Open Another Modal in Modal

Try this:// Hide the login modal$('#login').modal('hide');// Show the next modal after the fade effect is finishedsetTimeout(function(){ $('#lost').modal('show'); }, 500);This simple hack works for me.

View Article


Answer by teefars for Bootstrap: Open Another Modal in Modal

I also had some trouble with my scrollable modals, so I did something like this: $('.modal').on('shown.bs.modal', function () { $('body').addClass('modal-open'); // BS adds some padding-right to...

View Article

Answer by Elon Gomes Vieira for Bootstrap: Open Another Modal in Modal

try this<!DOCTYPE html><html lang="en"><head><title></title><meta charset="utf-8"><link rel="stylesheet"...

View Article


Answer by FirstVertex for Bootstrap: Open Another Modal in Modal

My solution does not close the lower modal, but truly stacks on top of it. It preserves scrolling behavior correctly. Tested in Bootstrap 3. For modals to stack as expected, you need to have them...

View Article

Answer by Ren for Bootstrap: Open Another Modal in Modal

Working on a project that has a lot of modals calling other modals and a few HTML guys that might not know to initiate it everytime for each button.Came to a similar conclusion as @gmaggio,...

View Article

Answer by Giraldi for Bootstrap: Open Another Modal in Modal

You can actually detect when the old modal closes by calling the hidden.bs.modal event: $('.yourButton').click(function(e){ e.preventDefault(); $('#yourFirstModal') .modal('hide')...

View Article
Browsing all 25 articles
Browse latest View live




Latest Images

<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>
<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596344.js" async> </script>