git.asbjorn.biz
/
jquery.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Make sure that we don't attempt to handle scrolling when the node is disconnected...
[jquery.git]
/
src
/
attributes.js
diff --git
a/src/attributes.js
b/src/attributes.js
index
dd6a3e7
..
147c353
100644
(file)
--- a/
src/attributes.js
+++ b/
src/attributes.js
@@
-164,7
+164,7
@@
jQuery.fn.extend({
var option = options[ i ];
// Don't return options that are disabled or in a disabled optgroup
var option = options[ i ];
// Don't return options that are disabled or in a disabled optgroup
- if ( option.selected && (jQuery.support.optDisabled ? !option.disabled : option.getAttribute("disabled") === null ) &&
+ if ( option.selected && (jQuery.support.optDisabled ? !option.disabled : option.getAttribute("disabled") === null) &&
(!option.parentNode.disabled || !jQuery.nodeName( option.parentNode, "optgroup" )) ) {
// Get the specific value for the option
(!option.parentNode.disabled || !jQuery.nodeName( option.parentNode, "optgroup" )) ) {
// Get the specific value for the option
@@
-215,6
+215,10
@@
jQuery.fn.extend({
val = "";
} else if ( typeof val === "number" ) {
val += "";
val = "";
} else if ( typeof val === "number" ) {
val += "";
+ } else if ( jQuery.isArray(val) ) {
+ val = jQuery.map(val, function (value) {
+ return value == null ? "" : value + "";
+ });
}
if ( jQuery.isArray(val) && rradiocheck.test( this.type ) ) {
}
if ( jQuery.isArray(val) && rradiocheck.test( this.type ) ) {
@@
-295,7
+299,14
@@
jQuery.extend({
jQuery.error( "type property can't be changed" );
}
jQuery.error( "type property can't be changed" );
}
- elem[ name ] = value;
+ if ( value === null ) {
+ if ( elem.nodeType === 1 ) {
+ elem.removeAttribute( name );
+ }
+
+ } else {
+ elem[ name ] = value;
+ }
}
// browsers index elements by id/name on forms, give priority to attributes.
}
// browsers index elements by id/name on forms, give priority to attributes.