-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathapp.js
More file actions
40 lines (32 loc) · 1015 Bytes
/
Copy pathapp.js
File metadata and controls
40 lines (32 loc) · 1015 Bytes
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
35
36
37
38
39
40
/* eslint-disable no-console */
/* eslint-disable func-names */
/* eslint-disable vars-on-top */
/* eslint-disable no-plusplus */
const toggleBar = document.querySelector('.fa-bars');
const mobileNav = document.querySelector('.menu-bar');
const closeBar = document.querySelector('.fa-window-close');
const navLink = document.querySelectorAll('.link');
const currentPage = window.location.pathname;
toggleBar.addEventListener('click', () => {
mobileNav.style.display = 'flex';
});
closeBar.addEventListener('click', () => {
mobileNav.style.display = 'none';
});
// Adding active Class
navLink.forEach((link) => {
if (link.href.includes(`${currentPage}`)) {
link.classList.add('active');
}
});
// eventbright
const exampleCallback = function () {
console.log('Order complete!');
};
window.EBWidgets.createWidget({
widgetType: 'checkout',
eventId: '355091898427',
modal: true,
modalTriggerElementId: 'eventbrite-widget-modal-trigger-355091898427',
onOrderComplete: exampleCallback,
});