A link should behave like a link!


/ Published in: JavaScript
Save to your folder(s)

/*
* There’s a lot of awesome functionality built into linking elements like <a> and .
* If you middle click or command-click on them they’ll open in new windows.
* When you hover over an <a> your browser tells you the URL in the status bar.
* Don’t break this behavior when playing with onReplaceState and onPushState.
* Embed the location of AJAX requests in the href attributes of anchor elements.
* Return true from Javascript click handlers when people middle or command click.
*
* http://warpspire.com/posts/url-design/ */

URL: http://warpspire.com/posts/url-design/

Report this snippet


Comments

RSS Icon Subscribe to comments

You need to login to post a comment.