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

Fires after the hs.container has been generated
void hs.onActivate()

The hs.container is a div that is appended to the body of the document and positioned at top:0 and left:0 in the page. Every HTML element that Highslide creates is appended to this container.

The hs.container is generated either on page load if any preloading is done, or when the first thumbnail is clicked. Appending it to the body of the document leads to problems in some cases, especially on ASP.NET pages if you are using input fields in the Highslide popup. In this case the input fields are moved out of the page form. See the example below for how to move them back into the form. Hooking into the hs.onActivate event is a good idea when the entire container should be moved in the DOM tree or repositioned using CSS. A reference to the "Loading" label, hs.loading, is also available when this event has fired.

Details

Requires events
Type event
Returns void

Example

Moving the hs.container

In this example we have a single pagewide form, typical for ASP.NET pages, and we want to move the hs.container into the page form to assure the input fields in our HTML expanders are part of the postback.

Put this in your head section after highslide.js is included:

<script type="text/javascript">
hs.onActivate = function() {
   var theForm = document.forms[0];
   if (theForm) theForm.appendChild(hs.container);
}
</script>
New, Edit