After successfully implementing a draggable single circle image when clicking a button, I am now looking to add multiple circle images each time the button is clicked.
I'm considering using the append function with the canvas tag for this purpose. Can someone help me understand how to implement this?
<script>
$(document).ready(function() {
$('#pink-circle-button').click(function() {
$('#currentCircle').show();
});
});
$(function() {
$( "#currentCircle" ).draggable();
});
$(document).ready(function(){
$("button#pink-circle-button").click(function(){
$("p").append("<canvas id='currentCircle' class='drawCircle'/>");
});
});
</script>
<style>
.drawCircle{border: 2px solid rgb(255, 0, 255);background-color:black; position: fixed; display: none; top: 97px; left: 572px; width: 153px; height: 150px; border-radius: 76.5px 76.5px 76.5px 76.5px;}
</style>
<canvas id="currentCircle" class='drawCircle'/></canvas>