How to integrate Thickbox into Exhibit

From SIMILE Widgets
Revision as of 00:09, 3 November 2015 by Tullyhansen (Talk | contribs)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to: navigation, search

About Thickbox

Thickbox is a webpage UI dialog widget written in JavaScript on top of the jQuery library. Its function is to show a single image, multiple images, inline content, iframed content, or content served through AJAX in a hybrid modal. learn more

The Code

The thickbox on document load hooks in onclick events for all <a> elements of class thickbox. You need to add a javascript function somewhere (most likely in the head of your html file) called, say, showThickbox:

<script type="text/javascript">
  function showThickbox(a){
    var t = a.title || || null;
    var g = a.rel || false;
    return false;

and then in your lens template, add an onclick handler to any <a> element like this:

  <a class="thickbox" 
     onclick="return showThickbox(this);">click here to view image in a thickbox</a>

That should do it. You can also use Thickbox to show external webpages, ajax content, and galleries of images. See the examples at

Personal tools