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

Allows specific formatting of each item in a thumbstrip.
string hs.stripItemFormatter ( DOMElement )
By default the thumbstrip items are a copy of the opening anchor's inner HTML. So if you have a thumbnail image wrapped by an a, the HTML of the thumbnail image will be copied over to the thumbstrip. You can for example use the id of the opening anchor to access one specific anchor.

Details

Requires slideshow, thumbstrip
Type function
Returns string

Parameters

DOMElement
The opening anchor, as in hs.Expander.prototype.a.

Example

Access a specific thumbnail by id, and change the output

The opening anchor has a text content instead of a thumbnail image:

<a id="thumb1" href="image1.jpg" onclick="return hs.expand(this, { slideshowGroup: 'group1' } )">
	Click to view a slideshow
</a>

The text doesn't look good in a thumbstrip, so we'll change this specific thumbstrip item to display a thumbnail instead. Place this code in the head section of your page or in a separate .js file.

hs.stripItemFormatter = function(a) {
	if (a.id == 'thumb1') return '<img src="thumb1.jpg" alt="" />';
}

See also

New, Edit