Bootstrap Modal
An abstraction layer for Bootstrap's modals to create and manipulate them through JavaScrip without the need of any HTML/DOM element.
Installation
Add this line to your application's Gemfile:
gem 'bootstrap-modal', github: 'ifad/bootstrap-modal'
Then execute:
$ bundle
And then require the Javascript from your application.js
:
//= require bootstrapmodal
Usage
From JavaScript:
var bm = new BootstrapModal({
element: 'modal-window',
header: {
style: null,
closeButton: {
text: null,
icon: 'icon-remove'
},
title: 'Modal panel',
content: null
},
body: {
content: 'Hello',
style: null
},
footer: {
content: 'Hello',
style: null
}
});
bm.show();
bm.hide();
Authors
- LLeir Borras Metje (@lleirborras)
- Marcello Barnaba (@vjt)
Background
Built after data-confirm-modal - check it out.
Contributing
- Fork it
- Create your feature branch (
git checkout -b my-new-feature
) - Commit your changes (
git commit -am 'Added some feature'
) - Push to the branch (
git push origin my-new-feature
) - Create new Pull Request