Object: hsVariables
Functions
EventsObject: hs.ExpanderVariablesFunctionsEvents
|
hs.addSlideshowAdd a slideshow where images are grouped and given a common control bar.
void hs.addSlideshow ( object options )
The addSlideshow function takes a hs.slideshowGroup as one of it's parameters. Thumbnails that are given this same slideshowGroup will be connected to the slideshow. Adding a slideshow means that the user can start an automatic slideshow display, that previous and next buttons only work within the group, and that a controlbar for the slideshow is created automatically and overlaid on the images. Unlike controlbars in Highslide prior to 4.0, these controls don't need to be assigned using hs.registerOverlay. The controls can be heavily customised using the hs.skin.controls string, or CSS.
Details
Parameters
ExampleExample 1: A slideshow with two images1) Put this code in the head section of your page. <script type="text/javascript"> hs.addSlideshow({ // slideshowGroup: 'group1', interval: 5000, repeat: false, useControls: true, fixedControls: true, overlayOptions: { opacity: .6, position: 'top center', hideOnMouseOut: true } }); // Optional: a crossfade transition looks good with the slideshow hs.transitions = ['expand', 'crossfade']; </script> 2) The thumbnails. <a class="highslide" href="../samples/full1.jpg" onclick="return hs.expand(this)"> <img src="../samples/thumb1.jpg" alt=""/> </a> <a class="highslide" href="../samples/full3.jpg" onclick="return hs.expand(this)"> <img src="../samples/thumb3.jpg" alt=""/> </a> Observe the effect of the above: Try moving the images by the move handle and then use the previous or next button. Observe how the next image is fixed to the button. See also |