これは初めてのjavascriptです。私はこのイメージをドラッグ可能にしようとしています。現在、元のPNGはドラッグ可能です。私はボタンをクリックしてイメージを複製しますが、これは動作しますが、クローンはドラッグ可能ではありません。助けてください!あなたのお時間をありがとうございました。クローンpngをドラッグ可能にするJquery
$(function() {
$(".draggable").draggable();
});
$(document).ready(function() {
$("button").click(function() {
$("body").append($("section:first").clone().addClass('drag(event)'));
});
});
<script src="https://ajax.googleapis.com/ajax/libs/jquery/2.1.1/jquery.min.js"></script>
<script src="https://code.jquery.com/ui/1.12.1/jquery-ui.js"></script>
<div id="div1">
<img src="http://i.imgur.com/kOOsSXe.jpg">
</div>
<section class="draggable" class="ui-widget-content">
<img src="http://i.imgur.com/RWdfFRO.png" ondragstart="drag(event)" width="50" height="130" draggable="true"> </section>
<button>Tank Man</button>
のようにコードを修正するためにあなたをお勧めします](http://stackoverflow.com/help/someone-answers) – lhavCoder