ihmodals

Classes

IHModals

Typedefs

options : Object

IHModals

Kind: global class

new IHModals(element, options)

Param Type
element HTMLElement
options options

ihModals.open()

Opens the modal

Kind: instance method of IHModals

ihModals.close()

Closes the modal

Kind: instance method of IHModals

ihModals.isOpen() ⇒ boolean

Current modal status

Kind: instance method of IHModals

ihModals.onOpen(callback)

Fired when the modal opens

Kind: instance method of IHModals

Param Type
callback function

ihModals.offOpen(callback)

Removes previously bound open callback

Kind: instance method of IHModals

Param Type
callback function

ihModals.onOpenOnce(callback)

Fired when the modal opens, but only once.

Kind: instance method of IHModals

Param
callback

ihModals.onClose(callback)

Fired when the modal closes

Kind: instance method of IHModals

Param Type
callback function

ihModals.offClose(callback)

Removes previously bound close callback

Kind: instance method of IHModals

Param Type
callback function

ihModals.onCloseOnce(callback)

Fired when the modal closes, but only once.

Kind: instance method of IHModals

Param Type
callback function

options : Object

Kind: global typedef
Properties

Name Type Description
[className] string Classname added to the modal when opened. Defaults to modal--open
[closeOnBackgroundClick] boolean Enable closing the modal when clicking outside the modal. Defaults to true.
[disableBackgroundListening] boolean Disabled listening of any background clicks. Used in special cases where you dont wan’t the modal service interfering with the background.
[onOpenCallback] function  
[onCloseCallback] function