Line 26: | Line 26: | ||
<script> | <script> | ||
var myContainer = document.getElementById('container'); | var myContainer = document.getElementById('container'); | ||
− | |||
− | |||
− | |||
− | |||
var mC = new Hammer(myContainer); | var mC = new Hammer(myContainer); | ||
+ | var myOverlay = document.getElementById('overlay'); | ||
var mO = new Hammer(myOverlay); | var mO = new Hammer(myOverlay); | ||
− | + | ||
mC.on("panright", function(ev) { | mC.on("panright", function(ev) { | ||
− | |||
− | |||
$('#container').addClass('inactive'); | $('#container').addClass('inactive'); | ||
− | $('# | + | $('#overlay').addClass('inactive'); |
}); | }); | ||
mO.on("panleft", function(ev) { | mO.on("panleft", function(ev) { | ||
− | |||
− | |||
$('#container').removeClass('inactive'); | $('#container').removeClass('inactive'); | ||
− | $('# | + | $('#overlay').removeClass('inactive'); |
+ | |||
}); | }); | ||
− | </script> | + | </script> |
</body> | </body> | ||
</html> | </html> |
Revision as of 14:55, 6 May 2017