https://github.com/kaleidawave/duplicatejs
A Javascript plugin for duplicating HTML elements
https://github.com/kaleidawave/duplicatejs
duplicate html javascript javascript-plugin
Last synced: about 1 month ago
JSON representation
A Javascript plugin for duplicating HTML elements
- Host: GitHub
- URL: https://github.com/kaleidawave/duplicatejs
- Owner: kaleidawave
- Created: 2019-03-05T16:28:12.000Z (over 7 years ago)
- Default Branch: master
- Last Pushed: 2019-03-08T10:49:01.000Z (over 7 years ago)
- Last Synced: 2025-03-23T02:27:47.033Z (about 1 year ago)
- Topics: duplicate, html, javascript, javascript-plugin
- Language: JavaScript
- Homepage:
- Size: 1.95 KB
- Stars: 0
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# Duplicate.js
Duplicate is a simple Javascript script for duplicating HTML elements. Given a node with children, Duplicate will clone the **first** child node by a number specified.
### How to use:
Simply import it into your HTML (Make sure it is deferred to make it run once the DOM is loaded)
```html
```
Then given a node with a child
```html
Hello
```
Will be transformed into:
```html
Hello
Hello
Hello
Hello
Hello
```
(data-duplicate refers to the **final** number of elements)