kafe.ext.colorbox

Class

Version 1.2.2

Extra methods for the colorbox jQuery plugin.

Source: dist/ext/colorbox.js

Methods

$.kafeColorbox('init')

Binds $(selector).colorbox() with the default params including theme.

$.kafeColorbox('init')
  • options

Parameters:

  • [options] Object Optional

    The colorbox params.

Example:

$('.picture').kafeColorbox('init', { theme:'Alternate' })

ajax

Calls $.colorbox() with an ajax content.

ajax
  • url
  • options

Parameters:

  • url String

    The content url.

  • [options] Object Optional

    The colorbox params.

changeTheme

Change the default theme, which is a class on the body with the name kafecolorbox-theme-THEME.

changeTheme
  • theme

Parameters:

  • theme String

    Theme name.

confirm

Simulate a confirm() behavior on a <a> link, using colorbox.dialog().

confirm
  • selector
  • message
  • OKLabel
  • CancelLabel

Parameters:

  • selector String|jQueryObject|DOMElement

    Link

  • message String

    Message

  • OKLabel String

    The label for the OK button

  • CancelLabel String

    The label for the Cancel button

dialog

Opens a message window with custom buttons.

dialog
  • content
  • commands

Parameters:

  • content String

    Message

  • [commands] Array(Object) Optional

    The buttons

    • label String

      The button label

    • [callback] Function Optional

      The callback called on button click, closes the colorbox if not specified

getParams

Get the default params with optional extra params.

getParams
  • options
Object

Parameters:

  • [options] Object Optional

    Options

Returns:

Object

The default colorbox params.

inline

Calls $.colorbox() with an inline content.

inline
  • selector
  • options

Parameters:

  • selector String

    The content selector.

  • [options] Object Optional

    The colorbox params.

moveInForm

Move the colorbox markup into .NET Webform

moveInForm (  )

open

Calls $.colorbox() with the default params including theme.

open
  • options

Parameters:

  • options Object

    The colorbox params.

setParams

Set the default params.

setParams
  • options

Parameters:

  • options Object

    Options

tmpl

Calls $.colorbox() with as content a rendered jsrender tmpl.

tmpl
  • tmpl
  • data
  • options

Parameters:

  • tmpl JSRenderTemplate

    The cached JSRender template.

  • [data] Object Optional

    The JSRender template data.

  • [options] Object Optional

    The colorbox params.