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:
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"> ...