Skip to content
Related Articles

Related Articles

Improve Article
Save Article
Like Article

jQuery UI dialog widget() Method

  • Last Updated : 17 Jan, 2021

The dialog widget() method in jQuery UI returns the dialog box’s widget element.


var a = $( ".selector" ).dialog("widget");

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

<link href = “” rel = “stylesheet”>
<script src = “”></script>
<script src = “”></script>



<!doctype html>
<html lang="en">
    <meta charset="utf-8">
    <link href=
    <script src=""></script>
        $(function () {
                autoOpen: false,
            $("#geeks").click(function () {
                var a = $("#gfg").dialog("widget");
    <div id="gfg" title="GeeksforGeeks">
        Jquery UI| widget dialog method
    <button id="geeks">Open Dialog</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 :

Start Your Coding Journey Now!