I am trying to clone a droppable object using jQuery, but the cloned object is not discarded.
$(document).ready(function(){ $("input[value='Add']").click(function(e){ e.preventDefault(); $("div.field:last").clone().insertAfter("div.field:last"); }); $(".field").droppable();
HTML
<div class="field"> Last Name<input type="text" value="" /> First Name<input type="text" value="" /> </div> <div class="field"> Last Name<input type="text" value="" /> First Name<input type="text" value="" /> </div> <input type="Submit" name="submit" value="Add" />
Firebug shows that the cloned object has a ui-droppable class, any idea why this will not work?
EDIT
Setting bool (true) or chaining a cloned object with .droppable () doesn't work either
jquery clone droppable
Sted
source share