Cloning an element and adding it to Dom multiple times
- by Praveen Prasad
//I am cloning a dom element and inserting it in dom element multiple times
<div class='toBeCloned'>some text</div>
<div id='target'></div>
var _clone=$('.toBeCloned').clone(true);//create clone
var _target=$('#target'); //this is target
_target.append(_clone); //append target
_target.append(_clone); //append target
_target.append(_clone); //append target
//this should add 3 elements but it's adding only one