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

Pixel width for the maximum width of the expanded image.
Rather than setting the hs.maxWidth and hs.maxHeight, it is recommended to let Highslide decide how much to reduce the image size to make it fit the viewport.

Details

Type integer
Default value null
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.maxWidth = 400;
</script>

Specifically setting it to a single expander

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

The effect:

Note that an icon appears in the bottom right corner to enable the user to fully expand the image. To hide this icon, set display: none in the .highslide-full-expand CSS rule.

See also

New, Edit