Object: hsVariables
Functions
EventsObject: hs.ExpanderVariablesFunctionsEvents
|
hs.Expander.prototype.reflowReflows 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
ExampleReflowing an expander1. 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: OpenSee also |