Skip to content
Related Articles
Open in App
Not now

Related Articles

jQuery UI Button instance() Method

Improve Article
Save Article
  • Last Updated : 02 Dec, 2021
Improve Article
Save Article

jQuery UI button instance Method is used to get the button’s instance object.


var a = $( ".selector" ).button( "instance" )

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" /> 
        .height { 
            height: 10px; 
        $(function () { 
            $("#buttonId, #submitId").button();
            $('#buttonId, #submitId').click(function (event) { 
                var a = $( this ).button("instance" );
    <h1 style="color:green">GeeksforGeeks</h1
    <b>jQueryUI | Button instance 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">  


My Personal Notes arrow_drop_up
Related Articles

Start Your Coding Journey Now!