Interface ColorboxSettings

Index

Properties

Properties

optional public ajax?: any

This property isn't actually used as Colorbox assumes all hrefs should be treated as either ajax or photos, unless one of the other content types were specified.

optional public arrowKey?: boolean

If false, will disable the left and right arrow keys from navigating between the items in a group.

optional public bottom?: any

Accepts a pixel or percent value (50, "50px", "10%"). Controls Colorbox's vertical positioning instead of using the default position of being centered in the viewport.

optional public className?: any

Adds a given class to colorbox and the overlay.

optional public close?: string

Text or HTML for the close button. The 'esc' key will also close Colorbox.

optional public current?: string

Text or HTML for the group counter while viewing a group. {current} and {total} are detected and replaced with actual numbers while Colorbox runs.

optional public data?: any

For submitting GET or POST values through an ajax request. The data property will act exactly like jQuery's .load() data argument, as Colorbox uses .load() for ajax handling.

optional public escKey?: boolean

If false, will disable closing colorbox on 'esc' key press.

optional public fadeOut?: number

Sets the fadeOut speed, in milliseconds, when closing Colorbox.

optional public fastIframe?: boolean

If false, the loading graphic removal and onComplete event will be delayed until iframe's content has completely loaded.

optional public fixed?: boolean

If true, Colorbox will be displayed in a fixed position within the visitor's viewport. This is unlike the default absolute positioning relative to the document.

optional public height?: any

Set a fixed total height. This includes borders and buttons. Example: "100%", "500px", or 500

optional public href?: any

This can be used as an alternative anchor URL or to associate a URL for non-anchor elements such as images or form buttons.

optional public html?: any

For displaying a string of HTML or text: $.colorbox({html:"

Hello

"});

optional public iframe?: boolean

If true, specifies that content should be displayed in an iFrame.

optional public imgError?: string

Error message given when a link to an image fails to load.

optional public initialHeight?: number

Set the initial height, prior to any content being loaded.

optional public initialWidth?: number

Set the initial width, prior to any content being loaded.

optional public inline?: boolean

If true, content from the current document can be displayed by passing the href property a jQuery selector, or jQuery object.

optional public innerHeight?: any

This is an alternative to 'height' used to set a fixed inner height. This excludes borders and buttons. Example: "50%", "500px", or 500

optional public innerWidth?: any

This is an alternative to 'width' used to set a fixed inner width. This excludes borders and buttons. Example: "50%", "500px", or 500

optional public left?: any

Accepts a pixel or percent value (50, "50px", "10%"). Controls Colorbox's horizontal positioning instead of using the default position of being centered in the viewport.

optional public loop?: boolean

If false, will disable the ability to loop back to the beginning of the group when on the last element.

optional public maxHeight?: any

Set a maximum height for loaded content. Example: "100%", 500, "500px"

optional public maxWidth?: any

Set a maximum width for loaded content. Example: "100%", 500, "500px"

optional public next?: string

Text or HTML for the next button while viewing a group.

optional public onCleanup?: any

Callback that fires at the start of the close process.

optional public onClosed?: any

Callback that fires once Colorbox is closed.

optional public onComplete?: any

Callback that fires right after loaded content is displayed.

optional public onLoad?: any

Callback that fires right before attempting to load the target content.

optional public onOpen?: any

Callback that fires right before Colorbox begins to open.

optional public opacity?: number

The overlay opacity level. Range: 0 to 1.

optional public open?: boolean

If true, Colorbox will immediately open.

optional public overlayClose?: boolean

If false, disables closing Colorbox by clicking on the background overlay.

optional public photo?: boolean

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')

optional public preloading?: boolean

Allows for preloading of 'Next' and 'Previous' content in a group, after the current content has finished loading. Set to false to disable.

optional public previous?: string

Text or HTML for the previous button while viewing a group.

optional public rel?: any

This can be used as an anchor rel alternative for Colorbox.

optional public reposition?: boolean

Repositions Colorbox if the window's resize event is fired.

optional public retinaImage?: boolean

If true, Colorbox will scale down the current photo to match the screen's pixel ratio

optional public retinaSuffix?: string

If retinaUrl is true and the device has a high resolution display, the href value will have it's extention extended with this suffix. For example, the default value would change my-photo.jpg to my-photo@2x.jpg

optional public retinaUrl?: boolean

If true and the device has a high resolution display, Colorbox will replace the current photo's file extention with the retinaSuffix+extension

optional public returnFocus?: boolean

If true, focus will be returned when Colorbox exits to the element it was launched from.

optional public right?: any

Accepts a pixel or percent value (50, "50px", "10%"). Controls Colorbox's horizontal positioning instead of using the default position of being centered in the viewport.

optional public scalePhotos?: boolean

If true, and if maxWidth, maxHeight, innerWidth, innerHeight, width, or height have been defined, Colorbox will scale photos to fit within the those values.

optional public scrolling?: boolean

If false, Colorbox will hide scrollbars for overflowing content.

optional public slideshow?: boolean

If true, adds an automatic slideshow to a content group / gallery.

optional public slideshowAuto?: boolean

If true, the slideshow will automatically start to play.

optional public slideshowSpeed?: number

Sets the speed of the slideshow, in milliseconds.

optional public slideshowStart?: string

Text for the slideshow start button.

optional public slideshowStop?: string

Text for the slideshow stop button

optional public speed?: number

Sets the speed of the fade and elastic transitions, in milliseconds.

optional public title?: any

This can be used as an anchor title alternative for Colorbox.

optional public top?: any

Accepts a pixel or percent value (50, "50px", "10%"). Controls Colorbox's vertical positioning instead of using the default position of being centered in the viewport.

optional public transition?: string

The transition type. Can be set to "elastic", "fade", or "none".

optional public width?: any

Set a fixed total width. This includes borders and buttons. Example: "100%", "500px", or 500

optional public xhrError?: string

Error message given when ajax content for a given URL cannot be loaded.