Skip to content
Related Articles

Related Articles

Improve Article
Save Article
Like Article

How to Enable an accordion using jQuery UI ?

  • Last Updated : 18 Jan, 2021

In this article, we will see how to enable an accordion in JqueryUI. To enable an accordion in jQuery UI, we will be using enable() method. jQuery UI enable() Method is used to enable the accordion and returns the accordion element completely to its initial state.


$( ".selector" ).accordion( "enable" )

Parameters: This method does not accept any parameters.

Return values: This method simply returns the button to its pre-initial state.

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

<script src=””></script>
<script src=””></script>
<link href=”” rel=”stylesheet” type=”text/css” />



<!DOCTYPE html> 
    <meta charset="utf-8"
    <meta name="viewport" content
        "width=device-width, initial-scale=1"
    <script src
    <script src
    <link href
        rel="stylesheet" type="text/css" /> 
        .height { 
            height: 10px; 
        $(function () { 
            $( "#gfg" ).accordion();
            $( "#gfg" ).accordion( "enable" );
         #gfg{font-size: 17px;}
    <h1 style="color:green">GeeksforGeeks</h1
    <b>jQueryUI | enable Accordion</b
    <div id="gfg">


My Personal Notes arrow_drop_up
Recommended Articles
Page :

Start Your Coding Journey Now!