R
R
Roman Tatarinov2016-12-28 12:17:58
JavaScript
Roman Tatarinov, 2016-12-28 12:17:58

How can regular js or even better jquery make it possible to pull out the menu on the left on the swipe (touch) event?

I am writing a jquery mobile menu plugin. The menu pops up when you click on the "hamburger". Back leaves when you click on the hamburger and overlay. I decided to ask myself how you can make the ability to pull the menu, as in mobile applications ?! So that you can swipe or touch to make a pull (leaving the menu). It’s better to pull it out, so that it’s straight, on which part you pulled it out, it pulled out on that, let it go - it went back. And so, at least just a swipe did - it opened. How can this be done? Or where can I read about it?

Answer the question

In order to leave comments, you need to log in

3 answer(s)
R
RTW, 2016-12-28
@RTW

You simply register touch events, start pulling at the start, the coordinates on the surface are determined on the move, on the end where the surface was released.
https://developer.mozilla.org/en-US/docs/Web/API/T...

V
Vlad, 2016-12-28
@Result007

Perhaps it will help. There was such a question before :)
Link

G
Grigory S., 2016-12-29
@Grigory90

https://slideout.js.org

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question