I have a button, and I decided to trigger that button:
$(button_name).trigger("click");
The handler of the function requires that the left button triggers the click when triggering using the mouse, but also does accepts clicks by triggering using code, like the line shown above. How can I create a conditional statement which evaluates if such conditions are true?
if((navigator.appName === "Microsoft Internet Explorer" && window.event.button === 1)
|| window.event.button == 0
|| ...){
/* If true, do this */
}