Actually, this is my mistake. The bug is still there. Probably should  
have read the bug report more closely before I spoke up.

I was looking at .val() as a getter, which *is* working correctly. The  
problem is with it as a setter ( .val('value') )

I put up a test case here:
http://test.learningjquery.com/option-values.html

The value of the select is reported correctly on change, but if you  
set it programmatically (click the button), it sets it to the wrong  
value.

Looks like the ticket was just closed and then re-opened.

Sorry for the confusion, everyone.

--Karl

____________
Karl Swedberg
www.englishrules.com
www.learningjquery.com




On Jan 28, 2009, at 9:27 AM, Karl Swedberg wrote:

> no prob. glad you brought it up. another closed bug is a good thing!  
> I'll close it.
>
>
> --Karl
>
> ____________
> Karl Swedberg
> www.englishrules.com
> www.learningjquery.com
>
>
>
>
> On Jan 28, 2009, at 9:01 AM, David Zhou wrote:
>
>>
>> Ah, okay, cool. Probably should have done a quick test to verify it
>> first on my part.  The ticket should probably be closed though if  
>> it's
>> fixed.  I saw a more recent ticket marked as a duplicate of this one,
>> so assumed it was still open.
>>
>> -- dz
>>
>>
>>
>> On Wed, Jan 28, 2009 at 8:44 AM, Karl Swedberg  
>> <[email protected]> wrote:
>>> Hi David,
>>> It looks like this is fixed in jquery.js 1.3.1:
>>> lines 406-07 (within the val function):
>>> if( jQuery.nodeName( elem, 'option' ) )
>>> return (elem.attributes.value || {}).specified ? elem.value :  
>>> elem.text;
>>> and lines 424-26:
>>> if ( option.selected ) {
>>> // Get the specifc value for the option
>>> value = jQuery(option).val();
>>>
>>> --Karl
>>> ____________
>>> Karl Swedberg
>>> www.englishrules.com
>>> www.learningjquery.com
>>>
>>>
>>>
>>> On Jan 28, 2009, at 4:24 AM, David Zhou wrote:
>>>
>>> http://dev.jquery.com/ticket/3104
>>>
>>> Seeing as last activity was around 4 months ago, is this still being
>>> worked on?  I was thinking about working on a patch, but was  
>>> unsure if
>>> someone had decided to leave the behavior as it currently is.
>>>
>>> -- dz
>>>
>>>
>>>
>>>
>>>
>>>>
>>>
>>
>>
>>
>
>
> >


--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"jQuery Development" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to 
[email protected]
For more options, visit this group at 
http://groups.google.com/group/jquery-dev?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to