An open API service indexing awesome lists of open source software.

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

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)