Side navigation
#10360 closed bug (invalid)
Opened September 28, 2011 07:16AM UTC
Closed September 28, 2011 12:52PM UTC
The Attribute Equals Selector doesn't seem to work with "hash"
Reported by: | evan@neezer.net | 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)
Attachments (0)
Change History (3)
Changed September 28, 2011 07:31AM UTC by comment:1
Changed September 28, 2011 07:39AM UTC by comment:2
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.
Changed September 28, 2011 12:52PM UTC by comment:3
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.