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("Модальное окно закрыто");
|
||||
});
|
||||
}
|
||||
});
|
||||
1
smartsoltech/static/assets/js/script.min.js
vendored
Normal file
1
smartsoltech/static/assets/js/script.min.js
vendored
Normal file
@@ -0,0 +1 @@
|
||||
!function(){"use strict";var e=document.querySelector("#mainNav");if(e){var o=e.querySelector(".navbar-collapse");if(o){var n=new bootstrap.Collapse(o,{toggle:!1}),t=o.querySelectorAll("a");for(var a of t)a.addEventListener("click",(function(e){n.hide()}))}var r=function(){(void 0!==window.pageYOffset?window.pageYOffset:(document.documentElement||document.body.parentNode||document.body).scrollTop)>100?e.classList.add("navbar-shrink"):e.classList.remove("navbar-shrink")};r(),document.addEventListener("scroll",r);var d=document.querySelectorAll(".portfolio-modal");for(var s of d)s.addEventListener("shown.bs.modal",(function(o){e.classList.add("d-none")})),s.addEventListener("hidden.bs.modal",(function(o){e.classList.remove("d-none")}))}}();
|
||||
Reference in New Issue
Block a user