You could try something like this (untested):
$('#mySelect option').filter(function() {
return parseInt(this.value, 10) > 5;
})
--Karl
_________________
Karl Swedberg
www.englishrules.com
www.learningjquery.com
On Nov 7, 2007, at 2:33 PM, Penner, Matthew wrote:
I have several options in a select element, each whose value is an
integer.
I would love to be able to select those above a threshold, such as
something like:
$(“#mySelect option[value>5]”)
I know I can do this with :gt(index) but I’d rather use the actual
value for less hard coding and better readability. I think this
would great in other areas too.
I’m sure there are lots of issues with this since the value is
really just text, but a straight string comparison would probably do.
Anyway, just my vote.
Let me know if there is a better place to suggest this.
Thanks,
Matt Penner