Side navigation
#10731 closed bug (duplicate)
Opened November 09, 2011 09:21AM UTC
Closed November 09, 2011 02:29PM UTC
Last modified November 09, 2011 02:30PM UTC
jq1.7 selector [value=""] Something wrong
Reported by: | dongdongface@gmail.com | Owned by: | |
---|---|---|---|
Priority: | low | Milestone: | None |
Component: | attributes | Version: | 1.7 |
Keywords: | Cc: | ||
Blocked by: | Blocking: |
Description
[value=""] not correct when input's value changed (ie is ok)
[value=] correct when input's value changed
Attachments (0)
Change History (3)
Changed November 09, 2011 02:29PM UTC by comment:1
component: | unfiled → attributes |
---|---|
priority: | undecided → low |
resolution: | → duplicate |
status: | new → closed |
Changed November 09, 2011 02:30PM UTC by comment:3
But not in the way you expect. It's actually IE that is wrong in this case. Keep in mind that the value attribute does not stay up to date with the current value, but only sets the default value. To select an input by their current value, you can do this:
$('input').filter(function() { return this.value === 'something'; });
The deprecation of the value hook will fix this.