Skip to content
Related Articles

Related Articles

Improve Article

jQuey UI accordion Widget() Method

  • Last Updated : 12 Jan, 2021

jQuery UI widget() Method is used to return the instance of the current jQuery accordion element.


var a = $( ".selector" ).accordion( "enable" )

Parameters: This method does not accept any parameters.

Return values: This method returns the instance of the current jQuery accordion element.

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

<script src=””></script> 

<script src=””></script> 

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

Example 1:


<!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();
            var a = $( "#gfg" ).accordion( "widget" );
         #gfg{font-size: 17px;}
    <h1 style="color:green">GeeksforGeeks</h1
    <b>jQueryUI | widget Accordion</b
    <div id="gfg">


Attention reader! Don’t stop learning now. Get hold of all the important Comcompetitivepetitve Programming concepts with the Web Design for Beginners | HTML  course.

My Personal Notes arrow_drop_up
Recommended Articles
Page :