I have a select tag that looks like this:
<select name="TZSelector" id="TheTZSelector">
<option>add another timezone</option>
<option>------------------------------------------------------</option>
<option></option>
<option value="-8.00">(Pacific Time) San Francisco</option>
<option value="-7.00">(Mountain Time) Denver
......
</select>
How can I return all the values that are in the options. Notice that option 1,2 and 3 don’t have values but that all others do.
I’m looking for something like this:
$(...).each(function () { MyFunction takes the value of $(this) as parameter });
That way, I can write MyFunction and iterate through the collection of options.
Thanks for your suggestions.
This will select all option’s that have values;
Fiddle: http://jsfiddle.net/8PHDp/1/