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.onImageClick

Fires when the user clicks the full size image.
boolean hs.Expander.prototype.onImageClick ( hs.Expander sender )
Returning false prevents the default close action. Use this event when you want another action to happen on image click, for example go to a webpage with details on the image, or cycle to the next picture (hs.next). The difference between this event and the hs.Expander.prototype.onBeforeClose event is that the latter fires on all ways of closing the expander.

Details

Requires events
Type event
Returns boolean

Parameters

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

Example

Confirm closing

This example shows how to return false to prevent closing based on user interaction. Put this in the head section of your page:

<script type="text/javascript">
hs.Expander.prototype.onImageClick = function (sender) {
   return confirm("Do you really want to close this nice image?");
}
</script>

The effect:

See also

New, Edit