Commit 39217443 authored by John Resig's avatar John Resig

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

.val() on empty options returns the text value rather than the value in Blackberry 4.7. Fixes #6932.
parent 396dd212
......@@ -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
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment