I want to make an a
element to gain focus, then press Enter to open the link.
<a id='link'>test</a>
I use $("#link").focus()
, but it doesn't work.
How can I do this?
http://jsfiddle.net/RLJ5r/1/
Works fine.
HTML:
<a href="http://google.com" id="link">test</a>
jQuery:
$("#link").focus();
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With