[ACCEPTED]-To have `removeID` for jQuery like `removeClass`-jquery

Accepted answer
Score: 17

More info at http://docs.jquery.com/Attributes/removeAttr


Score: 6

removeClass only exists because class is a multi-valued 5 attribute... if you have a <div class="one two three"> and you call 4 .removeClass("two") on it, it should end up with class="one three". addClass and removeClass exist 3 to save you from doing all that work yourself. id isn't 2 special in that way, so you just access 1 it with attr.

Score: 0

Remove class:


Remove id:



More Related questions