A simple method that doesn’t require JQuery:
while(elem.attributes.length > 0)
elem.removeAttribute(elem.attributes[0].name);
A simple method that doesn’t require JQuery:
while(elem.attributes.length > 0)
elem.removeAttribute(elem.attributes[0].name);