replace-tags

1.0.0 • Public • Published

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

Readme

Keywords

none

Package Sidebar

Install

npm i replace-tags

Weekly Downloads

55

Version

1.0.0

License

MIT

Last publish

Collaborators

  • marknotton