jQuery UI Droppable enable() Method Last Updated : 14 Dec, 2022 Summarize Comments Improve Suggest changes Share Like Article Like Report 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. Syntax: $('selector').droppable("enable"); Parameters: This method does not accept any parameters. CDN Links: First, add jQuery UI scripts needed for your project. <link rel=”stylesheet” href=”https://code.jquery.com/ui/1.12.1/themes/smoothness/jquery-ui.css”><script src=”https://code.jquery.com/jquery-1.12.4.js”></script><script src=”https://code.jquery.com/ui/1.12.1/jquery-ui.js”></script> Example: HTML <!doctype html> <html lang="en"> <head> <link rel="stylesheet" href= "https://code.jquery.com/ui/1.12.1/themes/smoothness/jquery-ui.css"> <script src= "https://code.jquery.com/jquery-1.12.4.js"> </script> <script src= "https://code.jquery.com/ui/1.12.1/jquery-ui.js"> </script> <style> 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; } </style> </head> <body> <h1>GeeksforGeeks</h1> <h3>jQuery UI Droppable enable() method</h3> <div id="div1">Drop here</div> <div id="div2">Drag me</div> <br> <button onclick="enableDroppable()"> Enable Droppable </button> <script> $("#div2").draggable(); $("#div1").droppable({ drop: () => alert("Element Dropped!") }); // Disable droppable by default $("#div1").droppable("disable"); // Enable droppable on function call function enableDroppable() { $("#div1").droppable("enable"); } </script> </body> </html> Output: Reference: https://api.jqueryui.com/droppable/#method-enable Comment More infoAdvertise with us Next Article jQuery UI Droppable enable() Method G gottumukkala_sivanagulu Follow Improve Article Tags : Web Technologies JQuery jQuery-UI jQuery-UI-Droppable Similar Reads jQuery UI Draggable enable() Method jQuery UI consists of GUI widgets, visual effects, and themes implemented using jQuery, CSS, and HTML. jQuery UI is great for building UI interfaces for the webpages. The jQuery UI Draggable enable() method is used to enable the draggable option. This method does not accept any parameter. Syntax: $( 1 min read jQuery UI Droppable instance() Method jQuery UI is a web-based technology and consists of GUI widgets, visual effects, and themes implemented using the jQuery, JavaScript Library. jQuery UI is the best tool for building UI interfaces for the webpages. It can also be used to build highly interactive web applications or can be used to add 2 min read jQuery UI Droppable disable() Method jQuery Mobile is a web-based technology that is used to make responsive content for websites that can be accessed on all types of smartphones, tablets, and desktops. In this article, we will be using the jQuery Mobile Droppable disable() method to disable the droppable and this also does not accept 2 min read jQuery UI Droppable widget() Method jQuery UI is a web-based technology and consists of GUI widgets, visual effects, and themes implemented using the jQuery, JavaScript library. jQuery UI is the best tool for building UI interfaces for the webpages. It can also be used to build highly interactive web applications or can be used to add 2 min read jQuery UI Droppable option() Method jQuery Mobile is a web-based technology that can be used to make responsive content for websites that can be accessed on all types of smartphones, tablets, and desktops. In this article, we are going to learn the jQuery Mobile Droppable option() method. Using this method, we can get, set or update a 3 min read Like