File tree Expand file tree Collapse file tree 1 file changed +7
-5
lines changed
Expand file tree Collapse file tree 1 file changed +7
-5
lines changed Original file line number Diff line number Diff line change @@ -1060,7 +1060,7 @@ jQuery.extend({
10601060 elem . parentNode . selectedIndex ;
10611061
10621062 // If applicable, access the attribute via the DOM 0 way
1063- if ( notxml && ! special && name in elem ) {
1063+ if ( name in elem && notxml && ! special ) {
10641064 if ( set ) {
10651065 // We can't allow the type property to be changed (since it causes problems in IE)
10661066 if ( name == "type" && jQuery . nodeName ( elem , "input" ) && elem . parentNode )
@@ -1083,11 +1083,13 @@ jQuery.extend({
10831083 // convert the value to a string (all browsers do this but IE) see #1070
10841084 elem . setAttribute ( name , "" + value ) ;
10851085
1086- if ( msie && special && notxml )
1087- return elem . getAttribute ( name , 2 ) ;
1088-
1089- return elem . getAttribute ( name ) ;
1086+ var attr = msie && notxml && special
1087+ // Some attributes require a special call on IE
1088+ ? elem . getAttribute ( name , 2 )
1089+ : elem . getAttribute ( name ) ;
10901090
1091+ // Non-existent attributes return null, we normalize to undefined
1092+ return attr === null ? undefined : attr ;
10911093 }
10921094
10931095 // elem is actually elem.style ... set the style
You can’t perform that action at this time.
0 commit comments