Bug Tracker

Opened 6 years ago

Closed 5 years ago

#5550 closed bug (invalid)

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.


Change History (1)

comment:1 Changed 5 years ago by snover

  • Resolution set to invalid
  • Status changed from new to closed

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

Note: See TracTickets for help on using tickets.