1.0.2 • Published 9 years ago

modal-layout v1.0.2

Weekly downloads
3
License
MIT
Repository
github
Last release
9 years ago

Modal Layout

NPM version Build Status Dependency Status devDependency Status

Modal your way

Install

Via NPM

npm i modal-layout --save

Via Bower

bower install modal-layout --save

Usage

var m = new ModalLayout('Awesome stuff!');

m.on('open', function(modalInstance) {
  console.log('modal is open', modalInstance);
});
m.open()

Api

ModalLayout(content [, opts])

Parameters

content

HTMLElement or string.

opts

OptionsDefaultDescription
esctrueclose modal pressing esc
beforeOpennullcall a method before open modal
prefix'modalLayout'prefix used in your css
escapefalseescape content html

Methods

MethodsDescription
openshow modal
closehide modal
destroydestroy modal
isOpencheck if modal is opened

Events

Events
open
close
destroy

License

MIT © Thiago Lagden