Note that there are some explanatory texts on larger screens.

plurals
  1. PO
    primarykey
    data
    text
    <p><strong>Don't remove that hash.</strong></p> <p>It's true that under (modern, at least) versions of Firefox, Chrome, Opera, and Safari, an anchor tag with an empty href (i.e. href="", not a missing href) will display as a normal link that simply doesn't respond when clicked, unlike the hash-href which jumps to the top of the page. Internet Explorer, however, takes a different approach.</p> <p>When a link without an href is clicked in Internet Explorer, it responds by opening your Desktop directory in Windows Explorer. I got this response in IE7 and IE8 (IE6 just crashed, though that could be unrelated - I've had issues with that VM).</p> <p>If a user browses your site in IE with JavaScript disabled, do you really want all your links to open their Desktop? I think not.</p> <p>Also important is that removing the href attribute from an anchor element entirely causes it to be rendered as plain text - i.e. it doesn't act as a link, you can't tab to it, etc. Not good.</p> <hr> <p>As for controlling the behaviour of the link when clicked, <a href="https://stackoverflow.com/questions/4095303/what-is-the-recommended-way-to-handle-links-that-are-used-just-for-style-and-or-i/4095330#4095330">@partoa</a> has the right, but possibly incomplete answer. </p> <p>I'm no JavaScript guru by any stretch of the imagination,but from what I've read you don't want to use <code>return false;</code> for this. According to <a href="http://fuelyourcoding.com/jquery-events-stop-misusing-return-false/" rel="nofollow noreferrer">this article</a> I came across a while ago, <code>return false;</code> has some additional behaviours you might not actually want. It recommends you just use <code>preventDefault</code> to stop the links normal behaviours (i.e. navigating to a new resource). Read over that link to see what <code>return false;</code> really does before deciding how you want to handle it.</p>
    singulars
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. VO
      singulars
      1. This table or related slice is empty.
    2. VO
      singulars
      1. This table or related slice is empty.
    3. VO
      singulars
      1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload