Hello. There is a page with departing (via burger and swipe) on the left menu
In general, I want the background to be darkened when leaving the menu on the left. I made it so that if you pull out and push the menu with a swipe, then everything is ok. But I can't synchronize this effect with the button. For example, I pulled it with a swipe, and pushed it with a burger or vice versa.
Added such fragment to js code:
$("#shadow_window").toggleClass("shadow"); Tobish when I click on the button I assign a class with transparency to the block mask. But firstly, it only works on pulling out, and secondly, if you first pull out / push in with a swipe, and then try to pull it out using the button, then the fragment does not work.
Taken from here
transitionwebref.ru/css/transition - Dmytryk