I followed and tried most answers found on related topics and got issue on this: Check if event is triggered by a human but for some reason (I can't figure it out), my code does not work.
The only difference from the said answered question is I use :
$("#try").get(0).click();
instead of
$("#try").click();
(This won't work on me that's why I'm I use the above code)
Problem:
$("#try").get(0).click();
always returns human triggered event [object MouseEvent].
Is there a way to know exactly if this the click event is triggered physically by humans without changing the event I used?
Note: I use $("#try").get(0).click();
event because I am using frame to show and hide table row information (toggle).
Goal: To only open 1 frame at a time and closing the others (closing of the other frame will be triggered by jQuery event).
$("#try").click(function(event) {
if (event.originalEvent === undefined) {
alert('not human')
} else {
alert(' human');
}
});
$('#click').click(function(event) {
// $("#try").click();
$("#try").get(0).click();
});