Created
January 23, 2012 15:57
-
-
Save gavinblair/1663956 to your computer and use it in GitHub Desktop.
Get hash of an anchor
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
$("<a href='http://www.google.com#hello'>gavin</a>")[0].hash //returns "#hello" | |
$("#mylink")[0].hash //jquery selector | |
document.getElementById("mylink").hash //no jquery |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment