-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathquoteBtn.js
32 lines (24 loc) · 983 Bytes
/
quoteBtn.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
var quoteBtn = document.getElementById('mega-menu-item-3035');
quoteBtn.addEventListener('click', function(e){
e.preventDefault();
quoteBtn.classList.add('modal-popup');
quoteBtn.setAttribute('data-target', '#popup-2900');
var customPopBox = document.getElementById('popup-2900');
//set modal classes
customPopBox.classList.add('modal');
customPopBox.classList.add('fade');
customPopBox.classList.add('in');
//set modal attributes
customPopBox.setAttribute('tabindex', '-1');
customPopBox.setAttribute('role', 'dialog');
customPopBox.setAttribute('aria-labelledby', 'popup-2900-label');
customPopBox.setAttribute('aria-hidden', 'false');
//set modal display
customPopBox.style.display = 'block';
});
//hide popbox when exit button is clicked
var popBoxClose = document.getElementsByClassName('fa-close');
popBoxClose[0].addEventListener('click', function(){
var customPopBox = document.getElementById('popup-2900');
customPopBox.style.display = 'none';
});