| @@ 8285-8324 (lines=40) @@ | ||
| 8282 | } |
|
| 8283 | }, |
|
| 8284 | select: { |
|
| 8285 | get: function( elem ) { |
|
| 8286 | var value, option, |
|
| 8287 | options = elem.options, |
|
| 8288 | index = elem.selectedIndex, |
|
| 8289 | one = elem.type === "select-one" || index < 0, |
|
| 8290 | values = one ? null : [], |
|
| 8291 | max = one ? index + 1 : options.length, |
|
| 8292 | i = index < 0 ? |
|
| 8293 | max : |
|
| 8294 | one ? index : 0; |
|
| 8295 | ||
| 8296 | // Loop through all the selected options |
|
| 8297 | for ( ; i < max; i++ ) { |
|
| 8298 | option = options[ i ]; |
|
| 8299 | ||
| 8300 | // oldIE doesn't update selected after form reset (#2551) |
|
| 8301 | if ( ( option.selected || i === index ) && |
|
| 8302 | ||
| 8303 | // Don't return options that are disabled or in a disabled optgroup |
|
| 8304 | ( support.optDisabled ? |
|
| 8305 | !option.disabled : |
|
| 8306 | option.getAttribute( "disabled" ) === null ) && |
|
| 8307 | ( !option.parentNode.disabled || |
|
| 8308 | !jQuery.nodeName( option.parentNode, "optgroup" ) ) ) { |
|
| 8309 | ||
| 8310 | // Get the specific value for the option |
|
| 8311 | value = jQuery( option ).val(); |
|
| 8312 | ||
| 8313 | // We don't need an array for one selects |
|
| 8314 | if ( one ) { |
|
| 8315 | return value; |
|
| 8316 | } |
|
| 8317 | ||
| 8318 | // Multi-Selects return an array |
|
| 8319 | values.push( value ); |
|
| 8320 | } |
|
| 8321 | } |
|
| 8322 | ||
| 8323 | return values; |
|
| 8324 | }, |
|
| 8325 | ||
| 8326 | set: function( elem, value ) { |
|
| 8327 | var optionSet, option, |
|
| @@ 7612-7650 (lines=39) @@ | ||
| 7609 | } |
|
| 7610 | }, |
|
| 7611 | select: { |
|
| 7612 | get: function( elem ) { |
|
| 7613 | var value, option, |
|
| 7614 | options = elem.options, |
|
| 7615 | index = elem.selectedIndex, |
|
| 7616 | one = elem.type === "select-one" || index < 0, |
|
| 7617 | values = one ? null : [], |
|
| 7618 | max = one ? index + 1 : options.length, |
|
| 7619 | i = index < 0 ? |
|
| 7620 | max : |
|
| 7621 | one ? index : 0; |
|
| 7622 | ||
| 7623 | // Loop through all the selected options |
|
| 7624 | for ( ; i < max; i++ ) { |
|
| 7625 | option = options[ i ]; |
|
| 7626 | ||
| 7627 | // IE8-9 doesn't update selected after form reset (#2551) |
|
| 7628 | if ( ( option.selected || i === index ) && |
|
| 7629 | ||
| 7630 | // Don't return options that are disabled or in a disabled optgroup |
|
| 7631 | ( support.optDisabled ? |
|
| 7632 | !option.disabled : option.getAttribute( "disabled" ) === null ) && |
|
| 7633 | ( !option.parentNode.disabled || |
|
| 7634 | !jQuery.nodeName( option.parentNode, "optgroup" ) ) ) { |
|
| 7635 | ||
| 7636 | // Get the specific value for the option |
|
| 7637 | value = jQuery( option ).val(); |
|
| 7638 | ||
| 7639 | // We don't need an array for one selects |
|
| 7640 | if ( one ) { |
|
| 7641 | return value; |
|
| 7642 | } |
|
| 7643 | ||
| 7644 | // Multi-Selects return an array |
|
| 7645 | values.push( value ); |
|
| 7646 | } |
|
| 7647 | } |
|
| 7648 | ||
| 7649 | return values; |
|
| 7650 | }, |
|
| 7651 | ||
| 7652 | set: function( elem, value ) { |
|
| 7653 | var optionSet, option, |
|
| @@ 7369-7404 (lines=36) @@ | ||
| 7366 | } |
|
| 7367 | }, |
|
| 7368 | select: { |
|
| 7369 | get: function( elem ) { |
|
| 7370 | var value, option, |
|
| 7371 | options = elem.options, |
|
| 7372 | index = elem.selectedIndex, |
|
| 7373 | one = elem.type === "select-one" || index < 0, |
|
| 7374 | values = one ? null : [], |
|
| 7375 | max = one ? index + 1 : options.length, |
|
| 7376 | i = index < 0 ? |
|
| 7377 | max : |
|
| 7378 | one ? index : 0; |
|
| 7379 | ||
| 7380 | // Loop through all the selected options |
|
| 7381 | for ( ; i < max; i++ ) { |
|
| 7382 | option = options[ i ]; |
|
| 7383 | ||
| 7384 | // IE6-9 doesn't update selected after form reset (#2551) |
|
| 7385 | if ( ( option.selected || i === index ) && |
|
| 7386 | // Don't return options that are disabled or in a disabled optgroup |
|
| 7387 | ( support.optDisabled ? !option.disabled : option.getAttribute( "disabled" ) === null ) && |
|
| 7388 | ( !option.parentNode.disabled || !jQuery.nodeName( option.parentNode, "optgroup" ) ) ) { |
|
| 7389 | ||
| 7390 | // Get the specific value for the option |
|
| 7391 | value = jQuery( option ).val(); |
|
| 7392 | ||
| 7393 | // We don't need an array for one selects |
|
| 7394 | if ( one ) { |
|
| 7395 | return value; |
|
| 7396 | } |
|
| 7397 | ||
| 7398 | // Multi-Selects return an array |
|
| 7399 | values.push( value ); |
|
| 7400 | } |
|
| 7401 | } |
|
| 7402 | ||
| 7403 | return values; |
|
| 7404 | }, |
|
| 7405 | ||
| 7406 | set: function( elem, value ) { |
|
| 7407 | var optionSet, option, |
|