How to remove an id attribute from a div using jQuery? How to remove an id attribute from a div using jQuery? jquery jquery

How to remove an id attribute from a div using jQuery?


The capitalization is wrong, and you have an extra argument.

Do this instead:

$('img#thumb').removeAttr('id');

For future reference, there aren't any jQuery methods that begin with a capital letter. They all take the same form as this one, starting with a lower case, and the first letter of each joined "word" is upper case.


I'm not sure what jQuery api you're looking at, but you should only have to specify id.

$('#thumb').removeAttr('id');