Bug Tracker

Opened 10 years ago

Closed 10 years ago

#13995 closed bug (notabug)

selectboxes without selected value not found

Reported by: [email protected] Owned by:
Priority: undecided Milestone: None
Component: unfiled Version: 1.10.1
Keywords: Cc:
Blocked by: Blocking:


I want to find Selectboxes with a selected option I use: $('select[value!="0"]') This worked in older versions but not in jQuery 1.9.1 or 1.10.1

fiddle related an alert appears with the number of fount selectboxes:

I select no option and click the DIV - jQuery 1.7.7 returns 0 http://jsfiddle.net/QesEY/1/ I switch to jQuery 1.10.1 and select no option - jQuery finds one box http://jsfiddle.net/QesEY/2/

Change History (1)

comment:1 Changed 10 years ago by dmethvin

Resolution: notabug
Status: newclosed

The current behavior is correct. There is no value attribute on the select, although there is a value property. CSS attribute selectors always should look at the attribute only. Here is a clearer example: http://jsfiddle.net/QesEY/4/

Note: See TracTickets for help on using tickets.