diff options
author | Darshan Baral <darshanbaral@gmail.com> | 2019-06-17 07:23:40 +0300 |
---|---|---|
committer | Darshan Baral <darshanbaral@gmail.com> | 2019-06-17 07:23:40 +0300 |
commit | 7c9675463cb60de322aa148e1903f42052fed800 (patch) | |
tree | 16bf1b9e3b5b37b20d2c9dcff3039110239c3263 | |
parent | 183dd795bd887933e5454d54ec634ac97b0a52ef (diff) |
Added touch to support iOS
-rw-r--r-- | static/js/myFunctions.js | 7 |
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);
|