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.
First difference:

```
.removeAttr('name')  // try to remove the attribute 'name' from the DOM
.attr('name', '')    // set the attribute 'name' to empty string

```

The second difference, probably happened only to me, is `.removeAttr()` work correctly in Firefox and IExplorer but not very well in Chrome and don't work at all on Safari.