I want to remove the id attribute from this image:
<img width="270" class="thumb" id="thumb" height="270" src="img/1_1.jpg" />
I tried doing this:
$('img#thumb').RemoveAttr('id','none');
But it is not removing the ID!
EDIT:
$('img#thumb').attr('src', response);
$('img#thumb').attr('id', 'nonthumb');
This deosnt load the picture, or in this case the src! But when I remove the id attribute, it works fine
This question is related to
javascript
jquery
html
image
I'm not sure what jQuery api you're looking at, but you should only have to specify id
.
$('#thumb').removeAttr('id');
Source: Stackoverflow.com