Jackson Jackson - 11 months ago 98
Javascript Question

jQuery: autoclick link?

I know this question has been asked many times before and there are countless answers for it but the issue that I have is that I have no idea why I cannot autoclick a link on page load!

I have used the same process over 20 times before without any issue but now it doesn't work...

Here is a fiddle with the issue: https://jsfiddle.net/1xy0f291/

and this is my code:


anyone has any idea why this is happening?


Basically $().click() will invoke the click event handler bound with it. Not the natural click.

For invoking the natural click you have to access the plain node object and call its click() function,