-
Notifications
You must be signed in to change notification settings - Fork 0
/
main.js
34 lines (30 loc) · 1.07 KB
/
main.js
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
const openModalTriggers = document.querySelectorAll(".show-popup")
const closeModalTriggers = document.querySelectorAll(".close")
openModalTriggers.forEach((trigger, i) => {
trigger.addEventListener("click", () => {
const popups = document.querySelectorAll(".popup")
popups[i].classList.toggle('is-show')
})
})
closeModalTriggers.forEach(trigger => {
trigger.addEventListener("click", e => {
const targetPopUp = e.target.closest(".popup")
targetPopUp.classList.toggle('is-show')
})
})
$(function () {
$('#responsive__hm-icon').on('click', function () {
$('.responsive__menu-trigger').toggleClass('active');
$('.responsive__nav').toggleClass('open');
$('.responsive__nav__menu').toggleClass('open');
$('.responsive__overlay').toggleClass('open');
});
});
$(function () {
$('#responsive__nav li a').on('click', function () {
$('.responsive__menu-trigger').toggleClass('active');
$('.responsive__nav').toggleClass('open');
$('.responsive__nav__menu').toggleClass('open');
$('.responsive__overlay').toggleClass('open');
});
});