Phillip Senn
Phillip Senn

Reputation: 47605

jQuery hash attribute

At 4 minutes into the "Scroll Linked Navigation" podcast Posted: Wed, 18 Aug 2010 at jQuery for Designers, Remy uses the hash attribute.

Q: Where is the hash attribute documented?

Upvotes: 2

Views: 1386

Answers (2)

Emmett
Emmett

Reputation: 14327

$('a[hash=#foo]') isn't explicitly documented, but it makes sense given the following:

A) The Link object has a hash property.

B) jQuery's "attribute equals selector" works on properties (not just attributes).

Upvotes: 1

Michael Robinson
Michael Robinson

Reputation: 29498

https://developer.mozilla.org/en/DOM/window.location

hash - The part of the URL that follows the # symbol, including the # symbol. You can listen for the hashchange event to get notified of changes to the hash in supporting browsers

Upvotes: 1

Related Questions