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 selectable image viewer

In our final selectable example, we're going to make a basic image viewer. Images can be chosen for viewing by selecting the appropriate thumbnail. Although this sounds like a relatively easy achievement, in addition to the actual mechanics of displaying the selected image, we'll also need to consider how to handle multiple selections.

The following screenshot shows an example of what we'll end up with:

Creating a selectable image viewer

Let's get started with the code. In a fresh page in your text editor, add the following page:

<!DOCTYPE HTML> <html> <head> <meta charset="utf-8"> <title>The Selectables Component</title> <link rel="stylesheet" href="development-bundle/themes/redmond/jquery.ui.all.css"> ...

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