So I'm starting to develop websites and I made a drawer style menu of google play for the mobile version of the site only that it does not hide when dragging it to the side does anyone know a way to make this interaction?
So I'm starting to develop websites and I made a drawer style menu of google play for the mobile version of the site only that it does not hide when dragging it to the side does anyone know a way to make this interaction?
You need to use jquery mobile to make this menu, because it's native, you can not get the swipeleft
and swiperight
The link to download jquery mobile is: link and you can choose only the functions you want to download, in this case, Touch functions. Just select the checkbox with this option as it will select all its 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
});