![Remove an attribute from an element](https://javascriptsource.com/wp-content/uploads/2021/12/Remove-an-attribute-from-an-element-702x526.jpg)
Remove an attribute (including data attributes) on an element. This method can also be used to manipulate other types of attributes—things like id
, tabindex
, name
, and so on.
var elem = document.querySelector('#lunch');
elem.removeAttribute('data-chips');
Source
https://vanillajstoolkit.com/reference/attributes/removeattribute/