#9396 closed feature (wontfix)
.hasAttr([ element ])
Reported by: | Owned by: | ||
---|---|---|---|
Priority: | low | Milestone: | 1.7 |
Component: | attributes | Version: | 1.6.1 |
Keywords: | 1.7-discuss | Cc: | |
Blocked by: | Blocking: |
Description (last modified by )
.hasAttr([ element ])
Similar to .hasClass() but with the use of attributes, for example we can check whether an element has an attribute, e.g.
$('#element').hasAttr('someattribute'); return either true or false
Change History (17)
comment:1 Changed 12 years ago by
Keywords: | 1.7-discuss added |
---|
comment:3 Changed 12 years ago by
Replying to rwaldron:
-1, Can be achieved with existing API
But it should be easy but implementing it - what happened to the easy writing? ;)
comment:6 Changed 12 years ago by
Component: | unfiled → attributes |
---|---|
Description: | modified (diff) |
Priority: | undecided → low |
Status: | new → open |
comment:8 follow-up: 9 Changed 12 years ago by
comment:9 follow-up: 10 Changed 12 years ago by
Replying to anonymous:
Replying to dmethvin:
-1, Bytes do not grow on trees you know.
It wouldn't be that much... god...
Feature request fulfilled: https://gist.github.com/1000671
comment:10 Changed 12 years ago by
Replying to rwaldron:
Replying to anonymous:
Replying to dmethvin:
-1, Bytes do not grow on trees you know.
It wouldn't be that much... god...
Feature request fulfilled: https://gist.github.com/1000671
That's pretty good. Would be excellent if it was implemented in the jQuery Core. :-)
comment:11 Changed 12 years ago by
Description: | modified (diff) |
---|
-1, Not really needed now that .attr("name") returns undefined if it isn't defined.
comment:15 Changed 12 years ago by
+1, can already do .is( "[someattribte]" ) but this provides good parity with .hasClass()
comment:16 Changed 12 years ago by
Milestone: | 1.next → 1.7 |
---|---|
Resolution: | → wontfix |
Status: | open → closed |
Closing per 1.7 roadmap meeting resolution
Nominating ticket for 1.7 discussion.