[jQuery] Re: Add option to combo

2009-03-18 Thread lucas
Thanks Paul!

[jQuery] Re: Add option to combo

2009-03-17 Thread Paul Mills
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

[jQuery] Re: Add option to combo

2009-03-17 Thread lucas
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!

[jQuery] Re: Add option to combo

2009-03-16 Thread Stephen Sadowski
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

[jQuery] Re: Add option to combo

2009-03-16 Thread Paul Mills
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