|
|
@ -14,7 +14,7 @@ |
|
|
|
|
|
|
|
|
|
|
|
window.addEventListener("touchend", function (e) { |
|
|
|
window.addEventListener("touchend", function (e) { |
|
|
|
var activeTab; |
|
|
|
var activeTab; |
|
|
|
var activeBody; |
|
|
|
var activeBodies; |
|
|
|
var targetBody; |
|
|
|
var targetBody; |
|
|
|
var targetTab; |
|
|
|
var targetTab; |
|
|
|
var className = 'active'; |
|
|
|
var className = 'active'; |
|
|
@ -36,9 +36,13 @@ |
|
|
|
|
|
|
|
|
|
|
|
if (!targetBody) return; |
|
|
|
if (!targetBody) return; |
|
|
|
|
|
|
|
|
|
|
|
activeBody = targetBody.parentNode.querySelector(classSelector); |
|
|
|
activeBodies = targetBody.parentNode.querySelectorAll(classSelector); |
|
|
|
|
|
|
|
|
|
|
|
if (activeBody) activeBody.classList.remove(className); |
|
|
|
if (activeBodies) { |
|
|
|
|
|
|
|
for (var i = 0; i < activeBodies.length; i++){ |
|
|
|
|
|
|
|
activeBodies[i].classList.remove(className); |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
targetBody.classList.add(className) |
|
|
|
targetBody.classList.add(className) |
|
|
|
}); |
|
|
|
}); |
|
|
|