.clone() Method

Syntax

$(selector).clone(includeEvents)

Description

".clone()" method is used to make the duplicate copies of the selected elements. This copies child, text and attributes of the selected elements. The below example shows you how to copy elements from the selected elements.

Example Code

Result:


Example 1:

Welcome to Hscripts.com

Hscripts is praised as best free webmaster resources online, by our users.

Free website content that help to develop, build, promote and maintain a web site.


Example 2:




Ask Questions

Ask Question