Thanks Paul!
Hi,
The prepend function just adds HTML at the beginning. You have to set
the select yourself. Simplest way would be like this:
$('select').prepend('Select ... ');
or something like this:
$('select').prepend('Select ... ');
$('select option:first').attr("selected","selected");
Paul
On Mar 17, 1
Thanks! but, prepend put the element at begining of the list in the
combo, but it isn´t selected as the first option
in the documentation i didn´t see nothing to put it as selected.
Thanks again!
Hey there,
how about using .prepend(), if all you want to do is insert it first?
-S
On Mon, 2009-03-16 at 08:25 -0700, Chizo wrote:
> Hi people, how can i add a first option value to a combobox,
> containing for example "Select..."
> With append i can add the new value, but i don´t know how to
Hi,
Try using prepend to add at the beginning.
See jQuery docs - http://docs.jquery.com/Manipulation/prepend
Paul
On Mar 16, 3:25 pm, Chizo wrote:
> Hi people, how can i add a first option value to a combobox,
> containing for example "Select..."
> With append i can add the new value, but i do
5 matches
Mail list logo