I'm trying to close a Sidemenu onclick
. however, touchstart
also detects scrolling as a click, so is touchend
.
how to just detect a click (not a scroll) on iPhone?
$('#html').on("click touchstart",function(e) {
var optionsmenue = $(".adminmenu_label");
if(!optionsmenue.is(e.target) && optionsmenue.has(e.target).length === 0) {
document.getElementById("Optionsmenu").style.width = "0%";
document.getElementById("Optionsmenu").style.transition = "0.2s ease-out";
document.getElementById("adblue").style.display = "block";
document.getElementById("whatever").style.display = "block";
document.getElementById("not_related").style.display = "block";
document.getElementById("still_not_related").style.display = "block";
document.getElementById("still_still_not_related").style.width = "100%";
}
});