Skip to content
Related Articles
Open in App
Not now

Related Articles

jQuery UI Accordion option() Method

Improve Article
Save Article
  • Last Updated : 27 Jan, 2021
Improve Article
Save Article

jQuery UI option() method is used to check if a method returns a boolean value representing if an object option exist or not.


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

Parameters: This method does not accept any parameters.

Return values: This method returns an object value

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


My Personal Notes arrow_drop_up
Related Articles

Start Your Coding Journey Now!