Clone HTML Elements X Times – Duplicate.js

Category: Javascript | March 26, 2019
Author:kaleidawave
Views Total:455 views
Official Page:Go to website
Last Update:March 26, 2019
License:MIT

Preview:

Clone HTML Elements X Times – Duplicate.js

Description:

Duplicate.js is a dead simple JavaScript library to duplicate/clone HTML html elements x times using repeat() method.

How to use it:

Insert the Duplicate.js script right before the closing body tag.

<script src="duplicate.js"></script>

Create an element to be cloned and specify the clone times in the data-duplicate attribute:

<div data-duplicate="10">
  <p> Hello World </p>
</div>

You Might Be Interested In:


Leave a Reply