@@ 8681-8711 (lines=31) @@ | ||
8678 | } ); |
|
8679 | ||
8680 | jQuery.extend( { |
|
8681 | prop: function( elem, name, value ) { |
|
8682 | var ret, hooks, |
|
8683 | nType = elem.nodeType; |
|
8684 | ||
8685 | // Don't get/set properties on text, comment and attribute nodes |
|
8686 | if ( nType === 3 || nType === 8 || nType === 2 ) { |
|
8687 | return; |
|
8688 | } |
|
8689 | ||
8690 | if ( nType !== 1 || !jQuery.isXMLDoc( elem ) ) { |
|
8691 | ||
8692 | // Fix name and attach hooks |
|
8693 | name = jQuery.propFix[ name ] || name; |
|
8694 | hooks = jQuery.propHooks[ name ]; |
|
8695 | } |
|
8696 | ||
8697 | if ( value !== undefined ) { |
|
8698 | if ( hooks && "set" in hooks && |
|
8699 | ( ret = hooks.set( elem, value, name ) ) !== undefined ) { |
|
8700 | return ret; |
|
8701 | } |
|
8702 | ||
8703 | return ( elem[ name ] = value ); |
|
8704 | } |
|
8705 | ||
8706 | if ( hooks && "get" in hooks && ( ret = hooks.get( elem, name ) ) !== null ) { |
|
8707 | return ret; |
|
8708 | } |
|
8709 | ||
8710 | return elem[ name ]; |
|
8711 | }, |
|
8712 | ||
8713 | propHooks: { |
|
8714 | tabIndex: { |
@@ 7270-7300 (lines=31) @@ | ||
7267 | } ); |
|
7268 | ||
7269 | jQuery.extend( { |
|
7270 | prop: function( elem, name, value ) { |
|
7271 | var ret, hooks, |
|
7272 | nType = elem.nodeType; |
|
7273 | ||
7274 | // Don't get/set properties on text, comment and attribute nodes |
|
7275 | if ( nType === 3 || nType === 8 || nType === 2 ) { |
|
7276 | return; |
|
7277 | } |
|
7278 | ||
7279 | if ( nType !== 1 || !jQuery.isXMLDoc( elem ) ) { |
|
7280 | ||
7281 | // Fix name and attach hooks |
|
7282 | name = jQuery.propFix[ name ] || name; |
|
7283 | hooks = jQuery.propHooks[ name ]; |
|
7284 | } |
|
7285 | ||
7286 | if ( value !== undefined ) { |
|
7287 | if ( hooks && "set" in hooks && |
|
7288 | ( ret = hooks.set( elem, value, name ) ) !== undefined ) { |
|
7289 | return ret; |
|
7290 | } |
|
7291 | ||
7292 | return ( elem[ name ] = value ); |
|
7293 | } |
|
7294 | ||
7295 | if ( hooks && "get" in hooks && ( ret = hooks.get( elem, name ) ) !== null ) { |
|
7296 | return ret; |
|
7297 | } |
|
7298 | ||
7299 | return elem[ name ]; |
|
7300 | }, |
|
7301 | ||
7302 | propHooks: { |
|
7303 | tabIndex: { |
@@ 7067-7094 (lines=28) @@ | ||
7064 | "class": "className" |
|
7065 | }, |
|
7066 | ||
7067 | prop: function( elem, name, value ) { |
|
7068 | var ret, hooks, notxml, |
|
7069 | nType = elem.nodeType; |
|
7070 | ||
7071 | // don't get/set properties on text, comment and attribute nodes |
|
7072 | if ( !elem || nType === 3 || nType === 8 || nType === 2 ) { |
|
7073 | return; |
|
7074 | } |
|
7075 | ||
7076 | notxml = nType !== 1 || !jQuery.isXMLDoc( elem ); |
|
7077 | ||
7078 | if ( notxml ) { |
|
7079 | // Fix name and attach hooks |
|
7080 | name = jQuery.propFix[ name ] || name; |
|
7081 | hooks = jQuery.propHooks[ name ]; |
|
7082 | } |
|
7083 | ||
7084 | if ( value !== undefined ) { |
|
7085 | return hooks && "set" in hooks && (ret = hooks.set( elem, value, name )) !== undefined ? |
|
7086 | ret : |
|
7087 | ( elem[ name ] = value ); |
|
7088 | ||
7089 | } else { |
|
7090 | return hooks && "get" in hooks && (ret = hooks.get( elem, name )) !== null ? |
|
7091 | ret : |
|
7092 | elem[ name ]; |
|
7093 | } |
|
7094 | }, |
|
7095 | ||
7096 | propHooks: { |
|
7097 | tabIndex: { |