V
V
Vyacheslav Belyaev2016-03-06 06:27:45
JavaScript
Vyacheslav Belyaev, 2016-03-06 06:27:45

How to implement multiple windows via Bootstrap Modal?

How can I make the opening of the second modal on top of the previous one via ajax
Using Bootstrap. An example implementation as in VK, that is, when the top one is closed, the previous window opens.
The window call goes like this

var $modal = $('#modal');
            $('.open-modalblock').on('click', function () {
                if ($modal.hasClass("in")) {
                    $('body').modalmanager();
                } else {
                    $('body').modalmanager('loading');
                }
                var href = $(this).attr('href');
                $modal.load(href, '', function () {
                    $modal.modal();
                });
            });

Used this example https://github.com/jschr/bootstrap-modal/blob/mast...

Answer the question

In order to leave comments, you need to log in

1 answer(s)
V
Vyacheslav Belyaev, 2016-03-06
@TroL929

Found the solution myself.
It was enough to set the data-replace="false" parameter so as not to replace the block

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question