igfs/resources/default/js/main.js

36 lines
844 B
JavaScript

(function ($) {
"use strict";
var fullHeight = function () {
$('.js-fullheight').css('height', $(window).height());
$(window).resize(function () {
$('.js-fullheight').css('height', $(window).height());
});
};
fullHeight();
$('#sidebarCollapse').on('click', function () {
$('#sidebar').toggleClass('active');
});
// $(".closeAlertBtn").click(function () {
// console.log($(this).parentNode)
// $(this).parentElement.alert("close");
// });
})(jQuery);
window.addEventListener("load", function () {
let closeBtn = document.querySelectorAll(".closeAlertBtn");
closeBtn.forEach((item) => {
item.addEventListener("click", closeAlert);
});
});
function closeAlert() {
this.parentNode.setAttribute("style", "display: none;")
}