Skip to main content

Bug Tracker

Side navigation

#5550 closed bug (invalid)

Opened November 25, 2009 08:59PM UTC

Closed November 19, 2010 10:58AM UTC

Selector option:gt(-1) doesn't work for Select fields

Reported by: caseol Owned by: john
Priority: major Milestone: 1.4
Component: selector Version: 1.3.2
Keywords: Cc:
Blocked by: Blocking:

I was trying to empty all options of a select field doing:

$("#MySelectFieldId option:gt(-1)").remove();

Using jQuery 1.3.2 it doesn't work, but using 1.2.6 does.

So, I check the size of the array returned:

$("#MySelectFieldId option:gt(-1)").size() and the result is 0 no matter the number of options inside the select field.

Hope it could help.


Attachments (0)
Change History (1)

Changed November 19, 2010 10:58AM UTC by snover comment:1

resolution: → invalid
status: newclosed

This selector makes no sense. If you want to select everything, omit the :gt.