Library for opening content in a modal window. Built to be used with web applications and ajax.
- Requires jQuery 1.7+
Add to your project's package.json
file, like:
npm install mpetty/modal --save-dev
$('.modal').modal2(options);
$('a').modal2(options);
$.modal2(options);
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