Consider this jQuery code ...
$('button#my').click(function(event) {
alert('hello');
});
$('button#my').click();
Obviously, this will bring up a warning window.
However, can I only say with jQuery if this event handler was launched with the code or if the user clicked it (without checking the ugly flag, for example var userClicked = true).
I thought there would be a property event, but I could not figure it out.
Is it possible?
Thank.
source
share