开发者

Using jQuery, can you paste a rectangle by clicking a button?

If you are using jQuery and have a CSS class called .draggable_rectangle, how can开发者_高级运维 you create a button that will draw a copy of the rectangle each time the user clicks the button?


<button id="copy_rectangle"></button>
<script>
$("#copy_retangle").click(function(){
  $(".draggable_rectangle").clone().appendTo("body");
  // add extra code to make it draggable
});
</script>
0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜