Chapter 15. Dialogs
In this chapter, I present how to work with the jQuery UI Dialog plugin, which provides pseudo-pop-up windows that are created using purely markup, CSS, and script.
Unlike pop-up windows, which require that you open a new document in a separate browser window that is increasingly saddled with security limitations, such as being unable to hide the URL of the document and being unable to hide the status bar at the bottom of the window, dialogs that are created using markup, CSS, and script can be styled in any way that you like and can impose any limitations that you like, for example, the ability to make a modal dialog, which provides a dialog and prevents the user from continuing to interact with the document until the dialog is closed.
Another difference between pop-up windows and dialogs (as I will now refer to this widget for the remainder of this chapter — without reiterating the fact that they are generated by markup, CSS, and script) is that dialogs are unable to leave the browser window in which they reside, so a dialog cannot be minimized to your operating system's taskbar, although you could possibly create your own minimization script so that the dialog can be minimized within the browser window.
As with many of the things that you've learned about in this book, jQuery UI again leaves very little to be desired in its own spare-no-function implementation of dialogs.
Implementing a Dialog
As with every other jQuery UI plugin, I begin the discussion of the ...
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.