Hikari
Hikari

Reputation: 3947

Retrieve jquery-ui dialog's div

When we apply $().dialog() in an object, jquery-ui puts it inside a <div class="ui-dialog ui-widget">, with a <div class="ui-dialog-titlebar ui-widget-header"> before it.

After the creation of this dialog around the main object, how can we get that ui-dialog object so that we can execute other JavaScript commands in it?

The best I could do was use .parent(".ui-dialog") in the main object, is there a better way to do it?

Upvotes: 0

Views: 54

Answers (1)

Matthew
Matthew

Reputation: 155

I think you might be looking for this:

var widget = $( "#yourdialogsource" ).dialog( "widget" );

This will get you the jQuery object of the wrapper for your dialog.

Upvotes: 2

Related Questions