removeAttr: function( name ) {
return this.each(function() {
- if ( this.nodeType === 1 ) {
- this.removeAttribute( name );
- }
+ jQuery.removeAttr( this, name );
+ });
+ },
+
+ prop: function( name, value ) {
+ return jQuery.access( this, name, value, true, jQuery.prop );
+ },
+
++ removeProp: function( name ) {
++ return this.each(function() {
++ // try/catch handles cases where IE balks (such as removing a property on window)
++ try {
++ this[ name ] = undefined;
++ delete this[ name ];
++ } catch( e ) {}
+ });
+ },
+
+ prop: function( name, value ) {
+ return jQuery.access( this, name, value, true, jQuery.prop );
+ },
+
removeProp: function( name ) {
return this.each(function() {
// try/catch handles cases where IE balks (such as removing a property on window)
}
}
}
- };
+ });
}
-})( jQuery );
+})( jQuery );