Skip to content
Related Articles

Related Articles

Improve Article
Save Article
Like Article

jQuery UI Resizable enable() Method

  • Last Updated : 06 Dec, 2021

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

Syntax:

$( ".selector" ).resizable( "enable" );

Parameter: This method does not accept any parameters.

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

<link rel=”stylesheet” href=”/code.jquery.com/ui/1.12.1/themes/smoothness/jquery-ui.css”>
<script src=”/code.jquery.com/jquery-1.12.4.js”></script>
<script src=”/code.jquery.com/ui/1.12.1/jquery-ui.js”></script>

Example:

HTML




<!doctype html>  
<html lang="en">  
   <head>  
      <link href=
"https:/code.jquery.com/ui/1.10.4/themes/ui-lightness/jquery-ui.css" 
            rel="stylesheet">  
      <script src=
"https:/code.jquery.com/jquery-1.10.2.js">
      </script>  
      <script src=
"https:/code.jquery.com/ui/1.10.4/jquery-ui.js">
      </script>  
      <style>  
         h1 {
             color: green;
         }
         .container{
             width: 320px;
         }
         #left-div {
             float: left;
         }
         #right-div{
             float: right;
         }
         #left-div,#right-div 
         
             width: 150px; 
             height: 150px;   
             text-align: center; 
             border: 2px solid black;
         }  
      </style>  
      <script>  
         $(function() {  
            $( "#left-div" ).resizable();  
            $( "#left-div" ).resizable('enable');  
            $( "#right-div" ).resizable();  
            $( "#right-div" ).resizable('disable');    
         });  
      </script>  
   </head>  
    
   <body
      <center>
           <h1>GeeksforGeeks</h1>  
           <h3>jQuery UI Resizable enable() Method</h3>
           <div class="container">  
              <div id="left-div">   
                 <h3 class="gfg">I'm Enable</h3>  
              </div>
              <div id="right-div">   
                 <h3 class="gfg">I'm Disable</h3>  
              </div>
           </div>
      </center>
   </body>  
</html>

Output:

Resizable enable() Method

Reference:https://api.jqueryui.com/resizable/#method-enable


My Personal Notes arrow_drop_up
Recommended Articles
Page :

Start Your Coding Journey Now!