hs.Expander.prototype.onBeforeClose
Fires before the expander closes.
boolean hs.Expander.prototype.onBeforeClose ( hs.Expander sender )
Returning false prevents the expanding from closing.
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.onBeforeClose = function (sender) {
return confirm("Do you really want to close this nice image?");
}
</script>
The effect:
See also