How to make objects draggable and droppable

I followed this tutorial on YT https://www.youtube.com/watch?v=8vs-SF2UWy4&t=28s
Sorry in advance if I made any mistakes here, I just started learning but I have to make draggable and droppable furniture
I can’t move the objects

here are the code that I wrote

    <div class="wrap">
        <div id="home">
            <div class="image"><img src="A.png" width="200px" alt=""></div>
            <div class="image"><img src="B.PNG" width="240px" alt=""></div>
            <div class="image"><img src="C.PNG" width="250px" alt=""></div>
            <div class="image"><img src="D.PNG" width="210px" alt=""></div>
            <div class="image"><img src="E.PNG" width="290px" alt=""></div>
            <div class="image"><img src="F.PNG" width="240px" alt=""></div>
            <div class="image"><img src="G.PNG" width="250px" alt=""></div>
            <div class="image"><img src="H.PNG" width="220px" alt=""></div>

        </div>
    </div>
    
<script scr="https://cdnjs.cloudflare.com/ajax/libs/jqueryui/1.12.1/jquery-ui.min.css"></script>
<script type="text/javascript">
    $(function (){
       $("#home .image").draggable();
    });
</script>

71 thoughts on “How to make objects draggable and droppable”

Leave a Comment