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

Allow the image to shrink to fit a small viewport.

If the viewport is small, the expanded pictures by default shrink to fit the area. This behaviour can be avoided by setting hs.allowSizeReduction to false. When the picture is shrinked, an icon appears in the lower right corner that the user can click to see the full size image. The appearance of this icon is controlled by hs.fullExpandTitle, hs.fullExpandOpacity, hs.fullExpandPosition and the .highslide-full-expand CSS rule.

The allowSizeReduction applies to images primarily. For HTML poups, the individual options, hs.allowWidthReduction and hs.allowHeightReduction, will override it.

Details

Requires autosize
Type boolean
Default value true
Overrideable inline Yes

Example

General setting to all expanders

Put this in the head section of your page. This affects all expanders on your page.

<script type="text/javascript">
   hs.allowSizeReduction = false;
</script>

Specifically setting it to a single expander

<a class="highslide" href="full1.jpg" 
      onclick="return hs.expand(this, { allowSizeReduction: false })">
   <img src="../samples/thumb1.jpg" alt=""/>
</a>

The effect

Resize you browser to smaller than the picture to see the effect.

True by default

False

See also

New, Edit