Skip to content
Permalink
Browse files

.val() on empty options returns the text value rather than the value …

…in Blackberry 4.7. Fixes #6932.
  • Loading branch information...
jeresig committed Aug 23, 2010
1 parent 396dd21 commit 392174431af1c9abc94ab6bd1c14f9f8f92a2a7d
Showing with 4 additions and 1 deletion.
  1. +4 −1 src/attributes.js
@@ -139,7 +139,10 @@ jQuery.fn.extend({

if ( elem ) {
if ( jQuery.nodeName( elem, "option" ) ) {
return (elem.attributes.value || {}).specified ? elem.value : elem.text;
// attributes.value is undefined in Blackberry 4.7 but
// uses .value. See #6932
var val = elem.attributes.value;
return !val || val.specified ? elem.value : elem.text;
}

// We need to handle select boxes special

0 comments on commit 3921744

Please sign in to comment.
You can’t perform that action at this time.