1.0.0 • Published 7 years ago

replace-tags v1.0.0

Weekly downloads
723
License
MIT
Repository
github
Last release
7 years ago

Replace Tags

Replace HTML tags with another

Installation

NPM

npm i replace-tags

Yarn

yarn add replace-tags

Bower

bower install replace-tags

Usage

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);