replace-tags
v1.0.0
Published
Replace HTML tags with another
Readme
Replace Tags
Replace HTML tags with another
Installation
NPM
npm i replace-tagsYarn
yarn add replace-tagsBower
bower install replace-tagsUsage
Replace all instances of 'div' tags with 'custom-div'
replaceTag('div', 'custom-div');This will do the same thing:
$('div').replaceTag('custom-div');You can pass in 'true' if you want to remove all other attributes that were part of the element
replaceTag('div', 'custom-div', true);