Skip to content
/ modal Public

Modal plugin for web applications

License

Notifications You must be signed in to change notification settings

mpetty/modal

Repository files navigation

Modal v1.17.11

Library for opening content in a modal window. Built to be used with web applications and ajax.

  • Requires jQuery 1.7+

Installation

Add to your project's package.json file, like:

    npm install mpetty/modal --save-dev

Usage

$('.modal').modal2(options);
$('a').modal2(options);
$.modal2(options);

Options available

closeModalName     : '[data-dismiss="modal"]',
backdropName       : 'modal-backdrop',
modalDialogName    : 'modal-dialog',
modalContentName   : 'modal-content',
modalSkin          : 'default',
modalName          : 'modal',
container          : 'body',
nestedForcesClose  : false,
html               : false,
ajax               : false,
width              : false,
centered           : false,
allowClose         : true,
allowCloseOverlay  : true,
afterInit          : $.noop,
afterOpen          : $.noop,
afterClose         : $.noop,
onBeforeClose      : $.noop