Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/darshanbaral/kitab.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--static/js/myFunctions.js7
1 files changed, 7 insertions, 0 deletions
diff --git a/static/js/myFunctions.js b/static/js/myFunctions.js
index 8b376af..4c962b5 100644
--- a/static/js/myFunctions.js
+++ b/static/js/myFunctions.js
@@ -1,4 +1,11 @@
window.onclick = function(event) {
+ checkClick(event);
+};
+window.ontouchstart = function(event) {
+ checkClick(event);
+};
+
+checkClick = function(event) {
let insideMenu = false;
Array.from(document.querySelectorAll(".show")).forEach(menu => {
insideMenu = insideMenu || menu.contains(event.target);