Modal box - Documentation

Options:

triggerElement
Type:string
Default: empty string

openDelay
Type:number
Default: null
Description: opens after X time in milliseconds

openScrolled
Type:number
Default: null
Description: Modal box will open when user scrolls from top of the page after given pixels

openAfterNClicks
Type:number
Default: null
Description: Modal box will open after N click. This option is using a cookie to count the clicks.

width
Type:string
Default: null
Descripion: Set width for the Modal box element

verticalCentering
Type:boolean
Default: false

topOffset
Type:string
Default: null
Description: Offset from top of the viewport

bottomOffset
Type:string
Default: null
Description: Offset from bottom of the viewport

keyboard
Type:boolean
Default: false
Description: Closes the Modal box when escape key is pressed

innerScroll
Type:boolean
Default: false
Description: Enables inner scroll and is visible only if the content is larger than the height of the viewport.

remote
Type:string
Default: null
Description: Enter URL from which the content will be loaded (loaded with AJAX).

responsive
Type:object
Default: empty object
Description: object containing responsive options or events

theme
Type: string
Default: empty string
Description: Include themes.css into header. You can use the already created themes or you can create your own. There's a info, success, warning and danger theme.

Methods:

openModal
This method opens the Modal box. Call openModal() method on a plugin instance.
modal.openModal();

closeModal
This method closes the Modal box. Call closeModal() method on a plugin instance.
modal.closeModal();

Events:

onInitialize
Runs a function after initialization.

onBeforeOpen
Runs a function before opening the Modal box.

onAfterOpen
Runs a function after opening.

onBeforeClose
Runs a function before closing the Modal box.

onAfterClose
Runs a function after closing the Modal box.

Github Download Documentation