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

On narrow images, pad the width of the expander to the minWidth to make room for the caption.
The caption takes the width of the image, which becomes a problem if the image is very small or narrow and the caption contains a lot of text. By setting hs.padToMinWidth to true and hs.minWidth to a suitable value, you ensure that the caption is not cramped into a narrow strip.

Details

Requires autosize
Type boolean
Default value false
Overrideable inline No

Example

Padding to 200px

Put this in your head section to make it apply to all small images.

<script type="text/javascript">
   hs.minWidth = 200;
   hs.padToMinWidth = true;
</script>

The markup:

<a class="highslide" href="../samples/digitalis.jpg" onclick="return hs.expand(this)">
   <img src="../samples/digitalis.tiny.png" alt="" style="width:28px; height:21px"/>
</a>
<div class="highslide-caption">
   <b>Digitalis</b> is a genus of about 20 species of herbaceous 
   perennials, shrubs, and biennials that was traditionally placed 
   in the figwort family Scrophulariaceae. Due to new genetic 
   research, it has now been placed in the much enlarged family 
   Plantaginaceae. The genus is native to Europe, western and 
   central Asia, and northwestern Africa.<br/>
   <div style="text-align: right; font-style:italic">
      (From <a href="http://en.wikipedia.org/wiki/Digitalis">Wikipedia</a>)
   </div>			
</div>

The effect:

Digitalis is a genus of about 20 species of herbaceous perennials, shrubs, and biennials that was traditionally placed in the figwort family Scrophulariaceae. Due to new genetic research, it has now been placed in the much enlarged family Plantaginaceae. The genus is native to Europe, western and central Asia, and northwestern Africa.
(From Wikipedia)

See also

New, Edit