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

If so, when to use each one?

Answer: 
They are quite different operations:

**attr(x, '')** sets an attribute to an empty string

**removeAttr(x)** deletes the property on the object if possible, or removes it and resets it to its default value if it is defined by the DTD for that object class.
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).