I am having problems on mobile devices/tablets with the events firing twice. When I click the following function, the menu that is supposed to drop down will drop down then
The following worked for me which is a slight modification for @JRules answer
// lo is just a global object holder
let lo = {
"handled":false
}
Using delegate because objects are not loaded on original page load
$('body').delegate('.linkRow','click touchend',function(e) { //
e.stopPropagation();
if(lo.handled === false){ // check
doSomething()
lo.handled = true
}
setTimeout(() => { // now set to false later (example here is 1/2 sec)
lo.handled = false
}, 500)
});