Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- var showModal = function(event){
- event.preventDefault();
- var allModals = document.querySelectorAll('.modal');
- for(var i = 0; i < allModals.length; i++){
- allModals[i].classList.remove('show');
- }
- var modalID = this.getAttribute("href");
- document.querySelector(modalID).classList.add('show');
- document.querySelector('#modal-overlay').classList.add('show');
- };
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement