|
|
|
@ -16,7 +16,6 @@
|
|
|
|
|
var findModals = function (target) { |
|
|
|
|
var i; |
|
|
|
|
var modals = document.querySelectorAll('a'); |
|
|
|
|
|
|
|
|
|
for (; target && target !== document; target = target.parentNode) { |
|
|
|
|
for (i = modals.length; i--;) { if (modals[i] === target) return target; } |
|
|
|
|
} |
|
|
|
@ -24,7 +23,7 @@
|
|
|
|
|
|
|
|
|
|
var getModal = function (event) { |
|
|
|
|
var modalToggle = findModals(event.target); |
|
|
|
|
if (!modalToggle || !modalToggle.hash) return document.querySelector(modalToggle.hash); |
|
|
|
|
if (modalToggle && modalToggle.hash) return document.querySelector(modalToggle.hash); |
|
|
|
|
}; |
|
|
|
|
|
|
|
|
|
window.addEventListener('touchend', function (event) { |
|
|
|
|