V
V
viktorross2019-02-08 09:55:07
JavaScript
viktorross, 2019-02-08 09:55:07

How does touchswipe work?

Hello, please tell me why touchswipe does not work?

<script type="text/javascript" src="http://localhost/swipe/jquery.touchSwipe.min.js"></script>
<script>
$("#nav").swipe({
  swipe:function(event, direction, distance, duration, fingerCount){
    $(this).text("You swiped " + direction + " for " + distance + "px" );
  },
  nav:10
});

</script>

<ul id="nav">

ul nav is a side menu that should pop up but nothing happens..

Answer the question

In order to leave comments, you need to log in

1 answer(s)
M
Medin K, 2019-02-08
@medin84

Because touchSwipe captures the event.
And what to do with the event is your task.
"Detects single and multiple finger swipes, pinches and falls back to mouse 'drags' on the desktop."
Try joanclaret.github.io/slide-and-swipe-menu
https://jsfiddle.net/aygvcu1L/

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question