boxplus: a lightweight pop-up window engine
This page discusses boxplus, a stand-alone lightbox script as well as a self-contained Joomla plug-in. Some of the particulars may differ from those of boxplus for jQuery, which is shipped with sigplus version 1.4.x.
- Supports all modern browsers, including Chrome, Safari, Firefox, Edge, Internet Explorer (≥ 11) and Opera.
- Displays a wide range of content types. Supports images, video, inline and external HTML (iframe), PDF documents, etc.
- Supports captions. Each image or content item can be assigned a title and a caption, which can make use of HTML tags.
- Pop-up window centers vertically and horizontally. Vertical centering takes into account any caption text. The pop-up window remains centered when the user scrolls down or across the page, or resizes the browser window.
- Various navigation controls. You can navigate to the next or previous image with the mouse or the keyboard (left arrow and right arrow), or use the thumbnail bar at the bottom to jump to any specific item, press HOME to jump to the first and END to the last content item.
- Fit to browser window. Large images are automatically reduced to fit available browser window space. The pop-up window can be expanded with the enlarge control in the upper right corner to view the image in its original size.
- Configurable layout. Panel containing captions and navigation icons can be aligned to above, at the top, at the bottom, or below the content being displayed.
- Asynchronous operation with no dead time delay. The script launches as soon as the document structure is available, even if some images are still being downloaded. Only those content items are retrieved that are shown to the visitor.
- Easily customizable appearance using valid CSS. All styling is done using cascading style sheet rules, which allows for simple theming.
- Small network footprint. Even while boxplus has many extra features, its compressed size is comparable to Slimbox 2, which claims to be the smallest lightbox script available for the MooTools framework (with a footprint of 4 KB).
See the boxplus demo page for an on-line demonstration of some of the features boxplus has to offer.
Solving common problems
Usually, boxplus is not used in isolation but as part of a site. Page template CSS style sheet files are a common cause of layout problems with boxplus. Some agressive templates may apply unusual properties to certain elements globally. As HTML elements boxplus uses are inserted below the body element in the HTML DOM tree, boxplus is affected by rules with global scope. For example, if a template sets z-index:1 with a global element selector img, it will make all absolutely positioned images cover other absolutely positioned elements, hiding boxplus overlay navigation controls, the enlarge/shrink control as well as thumbnail images inside the pop-up window. To remedy the issue, any such global declarations should be reset before boxplus styles would be applied using a Reset stylesheet or CSS reset. Such a stylesheet will clear most unusual style applications.
The following table compares boxplus to other lightweight pop-up window engines.
|Minified script size [bytes]||12714||4681||4123||21240||15624|
|Fit-to-window for large images|
|Thumbs in pop-up window for fast navigation|
|Wide-screen arrangement [*]|
|Panel for image background information|
|HTML in image captions|
|Displays custom HTML content|
|Displays Flash content and video|
|Displays HTML5 video|
|Displays Picasa web albums|
|Multiple configurations on a single page|
|Multiple themes on a single page|
|Caption and metadata script callbacks|
If you find that data in the table is inaccurate, please e-mail the developer and the table will be updated.
License and status
boxplus is licensed under the GPL. It is a non-commercial project with a goal to provide a lightweight, yet versatile tool to display images, video and other multimedia content on a web page. As such, it depends on donations for further development. Especially if you use boxplus in a commercial environment, you are strongly encouraged to make a donation.
The latest public release of boxplus is available for download from BitBucket. The files in the subfolders css and js have no external dependencies; they can be used stand-alone.