JavaScript:
$('.box').draggable({ helper: "clone" }).on('dragstart', function (e, ui) { $(ui.helper).css('z-index','999999'); }).on('dragstop', function (e, ui) { $(this).after($(ui.helper).clone().draggable()); });
CSS
.box{width:100px;height:100px;background-color:red;left:50px;top:50px;}
I changed the identifier to a class because cloning an element would result in it having a bunch of red squares with the same identifier, which is not good at all, and also removed the absolute positioning of the initial square, as that affected the clones ...
Working JSFiddle Demo
source share