Is it possible to remove all attributes at once using jQuery?
to
A simple method that doesn't require JQuery:
while(elem.attributes.length > 0) elem.removeAttribute(elem.attributes[0].name);