Bug Tracker

Ticket #2652: val[5790].diff

File val[5790].diff, 0.8 kB (added by flesler, 6 months ago)
  • jquery/src/core.js

     
    362362            if ( this.length ) { 
    363363                var elem = this[0]; 
    364364 
     365                if( jQuery.nodeName( elem, 'option' ) ) 
     366                    return jQuery.browser.msie && !elem.attributes.value.specified ? elem.text : elem.value; 
     367                 
    365368                // We need to handle select boxes special 
    366369                if ( jQuery.nodeName( elem, "select" ) ) { 
    367370                    var index = elem.selectedIndex, 
     
    379382 
    380383                        if ( option.selected ) { 
    381384                            // Get the specifc value for the option 
    382                             value = jQuery.browser.msie && !option.attributes.value.specified ? option.text : option.value; 
     385                            value = jQuery(option).val(); 
    383386 
    384387                            // We don't need an array for one selects 
    385388                            if ( one )