How to "trigger" a click event on a specific anchor element with Javascript? preferably with jQuery
Posted
by Alex
on Stack Overflow
See other posts from Stack Overflow
or by Alex
Published on 2010-05-17T17:52:58Z
Indexed on
2010/05/17
18:00 UTC
Read the original article
Hit count: 201
Hello there,
What I want to do is issue a click event, preferably with jQuery, on an anchor element, causing the browser to follow that link. I know that my anchor selectors are correct, as they are returning 1 from .length.
Here's what I've tried:
$('#awesomeLink').click();
But it won't follow the link.
How am I doing it wrong?
Thanks!!
© Stack Overflow or respective owner