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.Expander.prototype.onAfterGetCaption

Fires after the caption is grabbed.
void hs.Expander.prototype.onAfterGetCaption ( hs.Expander sender )
This is the place to do modifications to the caption content.

Details

Requires events, overlays
Type event
Returns void

Parameters

sender
The sender object in this context is the hs.Expander instance.

Example

Adding output to the caption

This example shows how to modify the caption after it has connected. We will put a link to the full size image at the bottom. Put this in the head section of your page:

<script type="text/javascript">
hs.Expander.prototype.onAfterGetCaption = function (sender) {
   if (sender.caption) {
      sender.caption.innerHTML += '<a href="'+ sender.content.src +'">View image only</a>';
   }
}
</script>

This is the markup for the thumbnail and caption:

<a class="highslide" href="../samples/full3.jpg" onclick="return hs.expand(this)">
   <img src="../samples/thumb3.jpg" alt=""/>
</a>
<div class="highslide-caption">
   A green Norwegian fjord.
</div>

The effect:

A green Norwegian fjord.

See also

New, Edit