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

An expression to be evaluated into the main content while using self rendering content wrapper.

By using maincontentEval you gain direct access into the hs.Expander context, which means you can define the content to be pulled from the alt attribute of the opening anchor, the title of the thumbnail or whatever property you want. You can also combine these.

Examples of using attributes from the opening anchor or the thumbnails are:

this.a.title
The title attribute of the opening anchor.
this.thumb.alt
The alt attribute of the thumbnail img.
this.thumb.title
The title attribute of the thumbnail img.

Details

Requires inline
Type string
Default value null
Overrideable inline Yes

Example

Pull it from the opener's title attribute

<a class="highslide" href="javascript:;" 
	title="This is the main content, 
	everything else is self rendering."
	onclick="return hs.htmlExpand(this, { 
	maincontentEval: 'this.a.title' })">Open</a>

See the effect:

Open

See also

New, Edit