Skip to content
Related Articles

Related Articles

Improve Article
Save Article
Like Article

jQuery UI Droppable enable() Method

  • Last Updated : 28 Dec, 2021

jQuery Mobile is a set of HTML5 based user system interaction widget toolbox used for various purposes build on top of jQuery. It is designed to build fast and responsive sites accessible to mobile, tabs, and desktops. The jQuery UI Droppable enable() method is used to enable the draggable elements to be accepted by the droppable element.



Parameters: This method does not accept any parameters.


CDN Links: First, add jQuery UI scripts needed for your project.

<link rel=”stylesheet” href=””>
<script src=””></script>
<script src=””></script>



<!doctype html>
<html lang="en">
    <link rel="stylesheet" href=
    <script src=
    <script src=
        h1 {
            color: green;
        div {
            color: white;
            display: flex;
            justify-content: center;
            align-items: center;
            text-align: center;
        #div2 {
            width: 150px;
            height: 150px;
            background: blue;
        #div1 {
            position: absolute;
            left: 250px;
            width: 200px;
            height: 200px;
            background: green;
            color: #fff;
    <h3>jQuery UI Droppable enable() method</h3>
    <div id="div1">Drop here</div>
    <div id="div2">Drag me</div>
    <button onclick="enableDroppable()">
      Enable Droppable
            drop: () => alert("Element Dropped!")
        // Disable droppable by default
        // Enab;e droppable on function call
        function enableDroppable() {



My Personal Notes arrow_drop_up
Recommended Articles
Page :

Start Your Coding Journey Now!