johnmerlino
06-30-2010, 07:20 PM
Hey all,
let's say this.filter_id refers to the select element below, which has three options:
<select id="filter_1">
<option value="0">Filter:</option>
<option value="2009-10-01">2009-10-01</option>
<option value="2009-11-20">2009-11-20</option>
</select>
var filter_value = jQuery(this.filter_id).val();
In this case, is the val() method returning the value (0) of the first option element or does it return the value of the collection of option elements as an array?
jQuery help page says this:
Get the current value of the first element in the set of matched elements.
Thanks for any response.
let's say this.filter_id refers to the select element below, which has three options:
<select id="filter_1">
<option value="0">Filter:</option>
<option value="2009-10-01">2009-10-01</option>
<option value="2009-11-20">2009-11-20</option>
</select>
var filter_value = jQuery(this.filter_id).val();
In this case, is the val() method returning the value (0) of the first option element or does it return the value of the collection of option elements as an array?
jQuery help page says this:
Get the current value of the first element in the set of matched elements.
Thanks for any response.