Bug Tracker

Ticket #5550 (closed bug: invalid)

Opened 5 years ago

Last modified 4 years ago

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:
Blocking: Blocked by:

Description

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.

Regards

Change History

comment:1 Changed 4 years ago by snover

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

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

Note: See TracTickets for help on using tickets.