1.0.0 • Published 8 years ago
replace-tags v1.0.0
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);1.0.0
8 years ago