jQuery hyperlinks - href value?

Posted by Tom on Stack Overflow See other posts from Stack Overflow or by Tom
Published on 2009-04-06T10:59:43Z Indexed on 2010/04/09 11:23 UTC
Read the original article Hit count: 288

Filed under:
|
|

Hi, On my website I use jQuery to hook the events of elements, namely hyperlinks. As these hyperlinks only perform actions on the current page, and do not lead anywhere, I have been putting a href attribute of "#" in:

<a href="#">My Link</a>

However in some browsers this causes the page to scroll right to top which is obviously undesirable behaviour. I've tried using a blank href value, or not including one, but then the mouse does not change to the hand cursor upon hovering.

What should I put in there?

© Stack Overflow or respective owner

Related posts about jQuery

Related posts about href