Skip to content
Browse files

Close menu when scrolling starts.

  • Loading branch information...
1 parent 43686a2 commit b414c8b1d8197d1e533317fc813ecefad9134e9b @beaucollins committed
Showing with 12 additions and 1 deletion.
  1. +12 −1 index.html
View
13 index.html
@@ -3,7 +3,7 @@
<meta http-equiv="Content-type" content="text/html; charset=utf-8">
<title>Radial Menu Demo</title>
<link rel="stylesheet" href="style.css" type="text/css" media="screen" charset="utf-8">
- <meta name="viewport" content="width=device-width,user-scalable=no">
+ <meta name="viewport" content="width=device-width,user-scalable=no,maximum-scale=1">
<script type="text/javascript" src="menu.js" charset="utf-8"></script>
</head>
<body>
@@ -69,5 +69,16 @@
<script type="text/javascript" charset="utf-8">
var m = new Menu(document.getElementsByTagName('nav')[0], { radius: 130 });
+ if (true) {};
+ var app = document.querySelector('#app');
+ if(app.ontouchmove !== undefined){
+ app.addEventListener('touchmove', function(){
+ m.close();
+ });
+ } else {
+ app.addEventListener('scroll', function(){
+ m.close();
+ })
+ }
</script>
</body>

0 comments on commit b414c8b

Please sign in to comment.
Something went wrong with that request. Please try again.