Web Development with jQuery®

(Elliott) #1

Summary (^) ❘ 415
You learned how to make a modal dialog using the modal option: You can use the modal option to
prevent interaction with the document in the background when the requisite CSS is added to the
style sheet.
You learned how to disable automatically opening a dialog using the autoOpen option. After auto-
matically opening a dialog has been disabled, you can programmatically open a dialog by calling
dialog('open') or close a dialog by calling dialog('close').
You can disable resizing a dialog or dragging a dialog using the resizable and draggable options.
You can animate opening and closing a dialog by providing an effect (documented in Appendix P) to
the show option.
Finally, there are a variety of events associated with a dialog that you can attach callback functions
to. You saw an example of the close event, but a full list of options is in Appendix P.
EXERCISES



  1. What option would you use to disable interaction with the document while a dialog is open?

  2. How do you disable automatically opening a dialog?

  3. How do you open a dialog when automatically opening the dialog is disabled?

  4. How do you close a dialog?

  5. How do you disable resizing and dragging a dialog?

  6. What option would you use to animate opening or closing a dialog?


http://www.it-ebooks.info

Free download pdf