I have this sample code:
The intent is that I want something to happen when you click on $myTrigger. If, on the other hand, you tab onto it via the keyboard (ie, focus) I want the exact same thing to happen, so I ask it to click.
The catch is if I click on it, it also focuses. So both alerts are going off.
Is there a way to prevent the focus event from going off when clicking?
Ajm's comment got me thinking that I'm maybe asking the wrong thing.
Or is it dependent on the particular element that I'm attaching the events to? (In this case $myObject happens to be an anchor tag (link).