Opened 11 years ago
Closed 11 years ago
#10360 closed bug (invalid)
The Attribute Equals Selector doesn't seem to work with "hash"
Reported by: | Owned by: | ||
---|---|---|---|
Priority: | low | Milestone: | None |
Component: | attributes | Version: | 1.6.3 |
Keywords: | Cc: | ||
Blocked by: | Blocking: |
Description
The attribute equals selector doesn't seem to work with "hash"; it returns "undefined". Accessing it directly via the DOM element works.
See example here: http://jsfiddle.net/XnDyh/
I discovered this when I was trying to track down why jQTouch wasn't working as expected with me, and I saw in the source code that the author was using $el.attr('hash') to determine if a link had a hash or not. Changing this to $el[0].hash fixes all my issues with jQTouch.
Tested with jQuery 1.6.2 & 1.6.3 & edge (latest version available on JSFiddle)
Change History (3)
comment:1 Changed 11 years ago by
comment:2 Changed 11 years ago by
Nevermind; forgot about .prop(), which seems to work. I'll file a bug fix with the author of jQTouch. Feel free to close this ticket.
comment:3 Changed 11 years ago by
Component: | unfiled → attributes |
---|---|
Priority: | undecided → low |
Resolution: | → invalid |
Status: | new → closed |
Closing at the request of the original ticket submitter. .prop() should indeed be used here.
I forgot to mention this does work in the JSFiddle example with jQuery 1.5.2.