Skip to content
Related Articles

Related Articles

Improve Article
Save Article
Like Article

jQuery UI Button widget() Method

  • Last Updated : 03 Dec, 2021

jQuery UI button widget() method returns an object which contains the visual representation of the button


$( ".selector" ).button("widget")

Parameters: This method does not accept any parameters.

Return values: This method returns an object 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( "widget" );
    <h1 style="color:green">GeeksforGeeks</h1
    <b>jQueryUI | Button widget 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
Recommended Articles
Page :

Start Your Coding Journey Now!