init commit
This commit is contained in:
15
smartsoltech/static/assets/js/modal-init.js
Normal file
15
smartsoltech/static/assets/js/modal-init.js
Normal file
@@ -0,0 +1,15 @@
|
||||
document.addEventListener("DOMContentLoaded", function () {
|
||||
var modalElement = document.getElementById('orderModal');
|
||||
if (modalElement) {
|
||||
var modal = new bootstrap.Modal(modalElement);
|
||||
|
||||
// Инициализация модального окна
|
||||
modalElement.addEventListener('show.bs.modal', function (event) {
|
||||
console.log("Модальное окно открыто");
|
||||
});
|
||||
|
||||
modalElement.addEventListener('hide.bs.modal', function (event) {
|
||||
console.log("Модальное окно закрыто");
|
||||
});
|
||||
}
|
||||
});
|
||||
Reference in New Issue
Block a user