.dialog()
Categories: UI
.dialog( [ options ] )
Plugin: jQuery.ui.dialog
Description: Apply the Dialog widget for each element in the set of matched elements
-
.dialog( [ options ] )
version added: 1.0options A map of additional options pass to the widget.
A dialog is a floating window that contains a title bar and a content area. The dialog window can be moved, resized and closed with the 'x' icon by default.
If the content length exceeds the maximum height, a scrollbar will automatically appear.
A bottom button bar and semi-transparent modal overlay layer are common options that can be added.
A call to $(foo).dialog()
will initialize a dialog instance and will auto-open the dialog by default. If you want to reuse a dialog, the easiest way is to disable the "auto-open" option with: $(foo).dialog({ autoOpen: false })
and open it with $(foo).dialog('open')
. To close it, use $(foo).dialog('close')
. A more in-depth explanation with a full demo is available on the Nemikor blog.
-
create
This event is triggered when dialog is created.
-
beforeClose
This event is triggered when a dialog attempts to close. If the beforeClose event handler (callback function) returns false, the close will be prevented.
-
open
This event is triggered when dialog is opened.
-
focus
This event is triggered when the dialog gains focus.
-
dragStart
This event is triggered at the beginning of the dialog being dragged.
-
drag
This event is triggered when the dialog is dragged.
-
dragStop
This event is triggered after the dialog has been dragged.
-
resizeStart
This event is triggered at the beginning of the dialog being resized.
-
resize
This event is triggered when the dialog is resized. demo
-
resizeStop
This event is triggered after the dialog has been resized.
-
close
This event is triggered when the dialog is closed.
-
destroy
-
.dialog( "destroy" )
version added: 1.0
Remove the dialog functionality completely. This will return the element back to its pre-init state.
-
-
disable
-
.dialog( "disable" )
version added: 1.0
Disable the dialog.
-
-
enable
-
.dialog( "enable" )
version added: 1.0
Enable the dialog.
-
-
option
-
.dialog( "option" , optionName , [value] )
version added: 1.0
Get or set any dialog option. If no value is specified, will act as a getter.
-
-
option
-
.dialog( "option" , options )
version added: 1.0
Set multiple dialog options at once by providing an options object.
-
-
widget
-
.dialog( "widget" )
version added: 1.0
Returns the .ui-dialog element.
-
-
close
-
.dialog( "close" )
version added: 1.0
Close the dialog.
-
-
isOpen
-
.dialog( "isOpen" )
version added: 1.0
Returns true if the dialog is currently open.
-
-
moveToTop
-
.dialog( "moveToTop" )
version added: 1.0
Move the dialog to the top of the dialogs stack.
-
-
open
-
.dialog( "open" )
version added: 1.0
Open the dialog.
-