Appendix P. Dialog

Method

Description

Return Value

Dialog Methods

dialog(options)

Makes the selected elements into dialog boxes.

jQuery

dialog("open")

Opens the specified dialog box(es).

jQuery

dialog("IsOpen")

Determines if the dialog is open.

Boolean

dialog("moveToTop")

Moves the specified dialog on top of the dialogs stack.

jQuery

dialog("close")

Closes the specified dialog box(es).

jQuery

dialog("destroy")

Completely removes the dialog.

jQuery

Dialog Options

Option

Description

Type

autoOpen

When set to true, the dialog will open automatically when dialog is called. If set to false, it will stay hidden until dialog("open") is called on it. The default is true.

Boolean

bgiframe

When true, the bgiframe plugin will be used, to fix the issue in IE6 where select boxes show on top of other elements, regardless of zIndex. Requires including the bgiframe plugin. Future versions may not require a separate plugin. The default is false.

Boolean

buttons

Specifies which buttons should be displayed on the dialog. The property key is the text of the button. The value is the callback function for when the button is clicked. The context of the callback is the dialog element; if you need access to the button, it is available as the target of the event object.

Object

dialogClass

The specified class name(s) will be added to the dialog, for additional styling.

String

draggable

When set to true, the resulting dialog will be draggable. If false, the dialog will not be draggable. The default is true.

Boolean

height

The height of the dialog, ...

Get Beginning JavaScript® and CSS Development with jQuery now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.