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

Reflows and recalculates the size of a HTML expander after the content is changed dynamically.
void hs.Expander.prototype.reflow()
Since version 4.0.7 iframe contents can be updated and Highslide reflows according to the new content.

Details

Requires html, autosize, positioning
Type function
Returns void

Example

Reflowing an expander

1. Define an update function for your expander. Normally, this function will talk to the server and get some new content by Ajax.

<script type="text/javascript">
   function update() {
      var slot = document.getElementById("slot");
      var newNode = document.createTextNode(" ...and more, ");
      slot.appendChild(newNode);
      var expander = hs.getExpander(slot);
      expander.reflow();
   }
</script>

2. Define the HTML content div and the anchor that opens it.

<a href="#" onclick="return hs.htmlExpand(this, { contentId: 'html-content'})">
  Open
</a>
<div class="highslide-html-content" id="html-content" style="width: 200px">
   <div class="highslide-header" style="text-align:right">
      <a href="#" onclick="return hs.close(this)">
         Close
      </a>
   </div>
   <div class="highslide-body" style="padding: 5px">
      <a href="javascript:update()">
         Click to fill in more content
      </a>
      <div id="slot">Fill me with more</div>
   </div>
</div>

Test the effect:

Open

See also

New, Edit