O'Reilly logo

jQuery UI 1.10: The User Interface Library for jQuery by Dan Wellman, Alex Libby

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Creating a dynamic image-based dialog

The class behind the dialog widget is compact and caters to a small range of specialized behavior, much of which we have already looked at. We can still have some fun with a dynamic dialog box, which loads different content depending on which element triggers it.

In a new page in your text editor, add the following code:

<!DOCTYPE html> <html> <head> <meta charset="utf-8"> <title>Dialog</title> <link rel="stylesheet" href="development-bundle/themes/redmond/jquery.ui.all.css"> <link rel="stylesheet" href="css/dialogTheme.css"> <script src="js/jquery-2.0.3.js"></script> <script src="development-bundle/ui/jquery.ui.core.js"></script> <script src="development-bundle/ui/jquery.ui.widget.js"></script> <script src="development-bundle/ui/jquery.ui.position.js"></script> ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required