Код: Выделить всё
[url=/website/orders/view/955792a9a10ae29dc3749308ab244603]ORD0019385[/url]
Вот что я уже пробовал..
Код: Выделить всё
$(document).ready(function() {
let modalStack = [];
$(document).on('hidden.bs.modal', '.modal', function () {
if (modalStack.length > 0) {
let lastOpenedModal = modalStack.pop();
$(lastOpenedModal).modal('hide');
$(lastOpenedModal).modal('show');
}
//console.log(modalStack.length);
//console.log('hey');
});
$(document).on('click', '[data-toggle="ajaxModal"]', function (event) {
let currentModal = $(this).closest('.modal');
currentModal.modal('hide');
modalStack.push(currentModal);
console.log(modalStack.length);
});
Может кто-нибудь мне помочь, что Я делаю что-то не так в приведенном выше коде?
Спасибо
Подробнее здесь: https://stackoverflow.com/questions/787 ... n-sequence