Web Development with jQuery®

(Elliott) #1

(^400) ❘ CHAPTER 17 DIALOG
<meta http-equiv='content-type'
content='application/xhtml+xml; charset=utf-8' />



Dialog Plugin








Lorem ipsum dolor sit amet, consectetuer adipiscing elit. In
sagittis commodo ipsum. Donec est. Mauris eget arcu. Suspendisse
tincidunt aliquam velit. Maecenas libero. Aliquam dapibus
tincidunt eros. Donec suscipit tincidunt odio. Maecenas congue
tortor non ligula. Phasellus vel elit. Suspendisse potenti. Nunc
odio quam, hendrerit ac, imperdiet sit amet, venenatis sed, enim.





The following style sheet is applied to the preceding markup document:
body {
font: 12px "Lucida Grande", Arial, sans-serif;
background: #fff;
color: rgb(50, 50, 50);
}
In the following script, you see how the
element with an id name exampleDialog is made into a
dialog by selecting that
element and then calling the dialog() method:
$(document).ready(
function()
{
$('div#exampleDialog').dialog();
}
);
In Figure 17-1, you can see that the dialog doesn’t look like much out-of-the-box. The title of the
dialog is set by placing the title in the title attribute of the element that you want to transform into
a dialog. The title of the dialog may also be set by passing a title option to the dialog() method;
either method of setting the title can be used. If both methods are used, the title option to the
dialog() method will be used.
[http://www.it-ebooks.info](http://www.it-ebooks.info)