Side navigation
#14547 closed bug (notabug)
Opened November 15, 2013 07:28AM UTC
Closed November 15, 2013 12:06PM UTC
.find method has different response in different jQuery
Reported by: | rqx110@163.com | Owned by: | |
---|---|---|---|
Priority: | undecided | Milestone: | None |
Component: | selector | Version: | 2.0.3 |
Keywords: | Cc: | ||
Blocked by: | Blocking: |
Description
I have a DOM on the page:
<div id="SearchContainer"><input type="text" value /><input type="text" value/></div>
.
I use
$("#SearchContainer").find('input[type="text"][value!=""]')
to try select the input object which value is not empty.
in jquery 1.7, I run the code and type some text string into textbox, and run the jquery code, it return the input object which I had typed.
in jquery 1.9.1/2.0, do the same job as above, but it doesn't return the input object.
*I have not test other version of jQuery.
Attachments (0)
Change History (1)
Changed November 15, 2013 12:06PM UTC by comment:1
component: | unfiled → selector |
---|---|
resolution: | → notabug |
status: | new → closed |
[value!=""]
is an ''attribute'' selector, which jQuery versions before 1.9 erroneously and inconsistently tried to apply against the value ''property'': http://jquery.com/upgrade-guide/1.9/#attr-versus-prop-