Search code examples
highslide

Auto change HS popup height based on dynamic content


Having a HS popup opened. After some actions the content inside the popup is changed (added content).

And a scroll bar will appear in order to navigate through the content.

How can I automatically resize or change height of the popup according to the new content and in this way no scroll bar will appear?

I suppose the height of the content is calculated upon firing "hs.htmlExpand".

I need same - determine the content height, but for an opened popup.


Solution

  • Two possible options:

    • resizeTo() function - in case width and height is known
    • reflow() function - in case container should be fluid

    Note to use Expander functions, highslide-full.js file is required.