How to hide a dragging Drawer menu?

Asked

Viewed 248 times

-1

So I’m starting to develop sites and I made a Google play-style Drawer menu for the mobile version of the site only it doesn’t hide when I drag it aside someone knows a way to do this interaction ?

1 answer

1

You need to use jquery mobile to perform this menu, because native, there is no way to capture the function swipeleft and swiperight

The link to download jquery mobile is: http://jquerymobile.com/download-builder/ and you can choose only the functions you want to download, in this case, the Touch functions. Just select the checkbox with this option it will select all your dependencies.

After doing this, apply the following code:

//para abrir o menu    
$(window).on("swiperight",function(e){
  //estilo do menu aberto
});

//para fechar o menu    
$(window).on("swipeleft",function(e){
  //estilo do menu fechado
});
  • Cool but it doesn’t follow touch? like google play if vc stops in the middle of the event, it stops together, knows how to do?

  • wDrik, have you managed to find any solution that does what you want? I have this doubt too

Browser other questions tagged

You are not signed in. Login or sign up in order to post.