+ 1

how to close a navigation menu by swiping it?

hey everybody I just wonder how you can create that animation when swiping the menu, I'll give you an example in this website https://jooble.org/ you press the navigation bars (when you are on your phone) and the it shows the menu, then you can swipe it to hide it. how can you do it with just vanilla javascript? it's difficult to find tutorials on it😅

14th Apr 2022, 5:57 PM
Jose
Jose - avatar
3 odpowiedzi
+ 3
One of solution would be to track position and to check does user "swap". This video show how to detect orientation of swipe: https://youtu.be/AiRNt4asPQI Here is more about events on phone, in beggining you can see touch object and all values it have, you can this access values and calculate data you need https://youtu.be/ga_SLzsUdTY Hope this videos can help you to understand more
14th Apr 2022, 6:30 PM
PanicS
PanicS - avatar
+ 2
Here is one more it show only swipe: https://youtu.be/bV9idMbioqg
14th Apr 2022, 6:32 PM
PanicS
PanicS - avatar
+ 2
PanicS thank you so much! the videos were helpful 👍
14th Apr 2022, 6:43 PM
Jose
Jose - avatar