API/libsapojs/SAPO/Component/Gallery

[Elements] are optional

Class SAPO.Component.Gallery


class SAPO.Component.Gallery

requires SAPO.Dom.Css

requires SAPO.Dom.Event

requires SAPO.Utility.Dimensions

requires (optional) SAPO.Effects.Fade

Defined in Component/Gallery/0.1/lib.js

Constructor Summary
Gallery (Object options)

Constructor Details

constructor Gallery

Gallery(Object options)
Parameters:
Element object
options - options for the new gallery
  • [ Object container ] - container for the gallery and it's controls (simple mode)
  • [ Array list ] - array with objects for gallery generation (programmatic mode). Each object should have href, src, title and caption properties
  • [ Boolean hoverControls ] - activate hover controls
  • [ Boolean hoverThumbs ] - use thumbs instead of prev/next on hover controls
  • [ Boolean navLinks ] - create prev/next links (programatic mode only)
  • [ Boolean endsLinks ] - create first/end links (programatic mode only)
  • [ Boolean navThumbs ] - use thumbs instead of prev/next on nav links (both modes, if true on simple mode, a.innerhtml gets replaced)
  • [ Number pageThumbs ] - define a number of thumbs per page for thumbs pagination. false for no pagination
  • [ String prevLabel ] - label for the previous link/hover control
  • [ String nextLabel ] - label for the next link/hover control
  • [ String firstLabel ] - label for the first link
  • [ String lastLabel ] - label for the last link
  • [ String prevPageLabel ] - label for the prev page link
  • [ String nextPageLabel ] - label for the next page link
  • [ Boolean showList ] - show the list of all image links/thumbs
  • [ Boolean showCaption ] - show the caption
  • [ Function onChange ] - callback executed on every item change