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