Jörn Zaefferer wrote:
>> If for example your option values would look like "02/21/2007" etc. you
>> could easily set the selected one with:
>>
>> $('#date').val('02/22/2007');
>>
>>
>> <select id="date">
>> ...
>> <option value="02/21/2007">02/21/2007</option>
>> ...
>> </select>
>>
>>
> Or, in case you have seperated selects for each value:
>
> $("#year option:contains(2007)").attr("selected", true);
>
>
thx to both of you! but why would the last one be better? i can set
single values with the first one too.
btw: only the first one seems to work. is there an error within the
contains-selector?
greets,
Arne
http://www.arnekolja.com
_______________________________________________
jQuery mailing list
[email protected]
http://jquery.com/discuss/