Highslide JS API Reference

Close Move
Lorem ipsum dolor sit amet, consectetuer adipiscing elit. Aliquam dapibus leo quis nisl. In lectus. Vivamus consectetuer pede in nisl. Mauris cursus pretium mauris. Suspendisse condimentum mi ac tellus. Pellentesque habitant morbi tristique senectus et netus et malesuada fames ac turpis egestas. Donec sed enim. Ut vel ipsum. Cras consequat velit et justo. Donec mollis, mi at tincidunt vehicula, nisl mi luctus risus, quis scelerisque arcu nibh ac nisi. Sed risus. Curabitur urna. Aliquam vitae nisl. Quisque imperdiet semper justo. Pellentesque nonummy pretium tellus.
Resize

Object: hs

Variables

Functions

Events

Object: hs.Expander

Variables

Functions

Events



hs.captionId

The id of the element to be cloned to an image caption.
Since version 3.3 you don't need a captionId to add a full HTML caption to your image. See captions for how to add a full caption the easy way. But there might be cases where you want the caption div to recide elsewhere in your page. Create a div somewhere in the page and give it a class name of highslide-caption and a specific id. Then add a captionId parameter to the hs.expand call, and point to the id of the caption div. If you want the same caption for all images, the captionId can be set generally in the head section of your page.

Details

Requires overlays
Type string
Default value null
Overrideable inline Yes

Example

A shared caption

Put this in the head section of your page. This affects all expanders on your page.

<script type="text/javascript">
   hs.captionId = 'the-caption';
</script>

Mark up the shared caption somewhere in your page's body.

<div class="highslide-caption" id="the-caption">
   This is the caption
</div>

See also

New, Edit