O'Reilly logo

Building UIs with Wijmo by Yuguang Zhang

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

Using the lightbox widget

The lightbox widget is a tool to give focus to images. It displays the current image on top of other page contents in a modal dialog. The Wijmo lightbox widget shares many common features with the carousel and gallery widgets, including the navigation buttons, timer, and caption area. The lightbox comes with default settings that show the control buttons on hover along with an image count. In addition, it also adds a close button to the top right corner.

Creating the lightbox widget

Unlike the gallery and carousel widgets, the lightbox requires options to be specified in the rel attribute of the anchor element. The following example shows the required elements and a script that creates the lightbox:

<!DOCTYPE HTML> <html> ...

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