Question: Is there generally a difference between `removeAttr(x)` and `attr(x, '')` in jQuery? 

If so, when to use each one?

Answer: 
Given that the defninition of removeAttr from the jQuery library (see below). I'd say yes.

```
removeAttr: function( name, fn ) {
        return this.each(function(){
            jQuery.attr( this, name, "" );
            if ( this.nodeType === 1 ) {
                this.removeAttribute( name );
            }
        });

```

Source: [Jquery 1.4.3 uncompressed version](http://code.jquery.com/jquery-1.4.3.js)

Although it is inherently subjective. I think using removeAttr is a more self-documenting approach. However, I could see other people thinking the opposite.
Some attributes are booleans (whether they exist or don't exist). Take the attribute `disabled` for example. If it exists then its true, it doesn't matter what the value is set to. So you'd have to use `.removeAttr('disabled')` to enable the element again. However, jQuery does normalize it a bit, you could use `.attr('disabled', false);` So I guess the answer is semantics.

**Edit:**

This answer just got some upvotes which alerted that I answered this several years ago.

Use this instead for properties -

```
.prop('disabled', true) // set as disabled
.prop('disabled', false) // set as enabled
.prop('disabled') // return boolean (is this disabled?)

```

**DO NOT** use removeProp('disabled') as this will delete the property from the DOM object (which is not what you are intending to do).