[jQuery] Re: Get the value of the option elements

2009-07-20 Thread Hector Virgen
I've run into this problem too and found that I get better results by accessing the "value" attribute instead of using .val(): $('#aUsers option:selected').each(function() { console.log('user: ' + $(this).attr('value')); }); -- Hector On Mon, Jul 20, 2009 at 2:40 AM, debussy007 wrote: > >

[jQuery] Re: Get the value of the option elements

2009-07-20 Thread debussy007
Uhm ... for some obscure reason I got it working now ... debussy007 wrote: > > Hello, > > The following code below doesn't seem to give the expected result: > > $('#aUsers option:selected').each(function() { > console.log('user: ' + $(this).val()); > }); > > It will display the empty