shopp('storefront.zoom-options')

Modifies the default options for the zoom effect used on the current page.

shopp('storefront', 'zoom-options', 'options')

@param string $object the object or object.tag combination, if object.tag is used, the tag parameter can be omitted
@param string $tag the tag, can be hyphenated or not. Prefix with 'get' as shorthand for the return=true option
@param mixed $options associative array, or url-style name=value pairs separated by ampersands (&). Each pair is passed to the theme api tag as an option.
@returns void

Modifies the default options for the zoom effect used on the current page. The available options are current as of the Colorbox 1.3.15 release. More details about Colorbox can be found in the Colorbox documentation.

Options

  • transition: Default is elastic. The transition type. Can be set to ‘elastic’, ‘fade’, or ‘none’.
  • speed: Default is 350. Sets the speed of the fade and elastic transitions, in milliseconds.
  • href: Default is false. This can be used as an alternative anchor URL or to associate a URL for non-anchor elements such as images or form buttons. Example: $('h1').colorbox({href:'welcome.html'})
  • title: Default is false. This can be used as an anchor title alternative for ColorBox.
  • rel: Default is false. This can be used as an anchor rel alternative for ColorBox. This allows the user to group any combination of elements together for a gallery, or to override an existing rel so elements are not grouped together. Example: $('#example a').colorbox({rel:'group1'}) Note: The value can also be set to ‘nofollow’ to disable grouping.
  • width: Default is false. Set a fixed total width. This includes borders and buttons. Example: ‘100%’, ‘500px’, or 500
  • height: Default is false. Set a fixed total height. This includes borders and buttons. Example: ‘100%’, ‘500px’, or 500
  • innerWidth: Default is false. This is an alternative to ‘width’ used to set a fixed inner width. This excludes borders and buttons. Example: ‘50%’, ‘500px’, or 500
  • innerHeight: Default is false. This is an alternative to ‘height’ used to set a fixed inner height. This excludes borders and buttons. Example: ‘50%’, ‘500px’, or 500
  • initialWidth: Default is 300. Set the initial width, prior to any content being loaded.
  • initialHeight: Default is 100. Set the initial height, prior to any content being loaded.
  • maxWidth: Default is false. Set a maximum width for loaded content. Example: ‘100%’, 500, ‘500px’
  • maxHeight: Default is false. Set a maximum height for loaded content. Example: ‘100%’, 500, ‘500px’
  • scalePhotos: Default is true. If ‘true’ and if maxWidth, maxHeight, innerWidth, innerHeight, width, or height have been defined, ColorBox will scale photos to fit within the those values.
  • scrolling: Default is true. If ‘false’ ColorBox will hide scrollbars for overflowing content. This could be used on conjunction with the resize method (see below) for a smoother transition if you are appending content to an already open instance of ColorBox.
  • iframe: Default is false. If ‘true’ specifies that content should be displayed in an iFrame.
  • inline: Default is false. If ‘true’ a jQuery selector can be used to display content from the current page. Example: $('#inline').colorbox({inline:true, href:'#myForm'});
  • html: Default is false. This allows an HTML string to be used directly instead of pulling content from another source (ajax, inline, or iframe). Example: $.colorbox({html:'<p>Hello</p>'});
  • photo: Default is false. If true, this setting forces ColorBox to display a link as a photo. Use this when automatic photo detection fails (such as using a url like ‘photo.php’ instead of ‘photo.jpg’, ‘photo.jpg#1′, or ‘photo.jpg?pic=1′)
  • opacity: Default is 0.85. The overlay opacity level. Range: 0 to 1.
  • open: Default is false. If true, the lightbox will automatically open with no input from the visitor.
  • returnFocus: Default is true. If true, focus will be returned when ColorBox exits to the element it was launched from.
  • preloading: Default is true. Allows for preloading of ‘Next’ and ‘Previous’ content in a shared relation group (same values for the ‘rel’ attribute), after the current content has finished loading. Set to ‘false’ to disable.
  • overlayClose: Default is true. If false, disables closing ColorBox by clicking on the background overlay.
  • escKey: Default is true. If false, will disable closing colorbox on esc key press.
  • arrowKey: Default is true. If false, will disable the left and right arrow keys from navigating between the items in a group.
  • loop: Default is true. If false, will disable the ability to loop back to the beginning of the group when on the last element.
  • slideshow: Default is false. If true, adds an automatic slideshow to a content group / gallery.
  • slideshowSpeed: Default is 2500. Sets the speed of the slideshow, in milliseconds.
  • slideshowAuto: Default is true. If true, the slideshow will automatically start to play.
  • slideshowStart: Default is start slideshow. Text for the slideshow start button.
  • slideshowStop: Default is stop slideshow. Text for the slideshow stop button
  • previous: Default is previous. Text for the previous button in a shared relation group (same values for ‘rel’ attribute).
  • next: Default is next. Text for the next button in a shared relation group (same values for ‘rel’ attribute).
  • close: Default is close. Text for the close button. The ‘Esc’ key will also close ColorBox.
  • current: Default is image %s of %s. Text format for the content group / gallery count. {current} and {total} are detected and replaced with actual numbers while ColorBox runs.
  • onOpen: Default is false. Callback that fires right before ColorBox begins to open.
  • onLoad: Default is false. Callback that fires right before attempting to load the target content.
  • onComplete: Default is false. Callback that fires right after loaded content is displayed.
  • onCleanup: Default is false. Callback that fires at the start of the close process.
  • onClosed: Default is false. Callback that fires once ColorBox is closed.

See Also

You must be logged in to post a comment.

© Ingenesis Limited. Shopp™ is a registered trademark of Ingenesis Limited.

Skip to toolbar