Open In App
Related Articles

jQuery UI Draggable disabled() Method

Improve Article
Save Article
Like Article

The 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 disable() method is used to disable the draggable property of the HTML div element. This method does not accept any parameters.


$( ".selector" ).draggable( "disable" );

Parameters: This method does not accept any parameter.

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

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

Example: The below example illustrates the Draggable disable() method in jQuery UI.


<!doctype html>
<html lang="en">
    <link rel="stylesheet"
    <script src=
    <script src=
        h1 {
            color: green;
            width: 320px;
        #left-div {
            float: left;
            float: right;
            width: 150px;
            height: 150px;
            text-align: center;
            border: 2px solid black;
        $(function() {
            $( "#left-div" ).draggable();
            $( "#left-div" ).draggable('enable');
            $( "#right-div" ).draggable();
            $( "#right-div" ).draggable('disable');    
        <h3>jQuery UI Draggable disabled() Method</h3>
        <div class="container">
            <div id="left-div">
                <h3 class="gfg">I'm Enable</h3>
            <div id="right-div">
                <h3 class="gfg">I'm Disable</h3>


jQuery UI Draggable disabled() Method

Last Updated : 08 Dec, 2021
Like Article
Save Article
Similar Reads
Related Tutorials