.clone(true)
引数trueでイベントもコピー
$(function() { $("#sample1box").click( function () { $(this).clone().appendTo("#copy"); }); });
$(function(){ $("tr").on({ click: function(){ $(this).clone().appendTo('#tbl'); }, mouseover: function(){ $(this).css("background", "rgba(100,150,200,0.8)"); }, mouseout: function(){ $(this).css("background", ""); } }); });