Skip to content
Related Articles

Related Articles

Improve Article

jQuery UI option (optionName) Method

  • Last Updated : 05 Jan, 2021
Geek Week

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


$( ".selector" ).button( "option","optionName" )


  • optionName: option to be checked.

Return values: This method returns a boolean value.

  • Links for jQuery UI libraries:

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

  • OR

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

Below are the example which shows the implementation of this method.

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 () { 
            $("#buttonId, #submitId").button();
            $('#buttonId, #submitId').click(function (event) { 
                var a = $( this ).button( "option", "disabled" );
    <h1 style="color:green">GeeksforGeeks</h1
    <b>jQueryUI | Button option Method</b
    <div class="height"> </div><br
    <div class="buttons-div"
        <button id="buttonId">Button element</button
        <input id="submitId" type="submit" value="Submit button">  



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

My Personal Notes arrow_drop_up
Recommended Articles
Page :