saribe / eModal

Easy Modal for bootstrap, is a simple way to create modal dialogs using javascript.
http://saribe.github.io/eModal
271 stars 97 forks source link

Backdrop and keyword options not working #30

Closed efusionsoft closed 8 years ago

efusionsoft commented 8 years ago

Bootstrap modal supports backdrop:static and keyword: false options so that the modal box does not closes if you accidentally clicks outside of a modal box but this is not working with this plugin.

saribe commented 8 years ago

Yes, it supports, you can do that!

 // set modal options
 eModal.setModalOptions({
    backdrop: 'static',
    keyboard: false
  });
efusionsoft commented 8 years ago

Thanks @saribe it worked! I was trying:

$('.post-job').click(function (event){
            var options = {
            url: 'job/new',
            title:'Post your requirements',
            buttons:[],
            size: eModal.size.lg,
            useBin: true,
            backdrop: 'static',
            keyboard: false
            };
            eModal.iframe(options);
        });

I changed it to below code to make it work:

eModal.setModalOptions({
    backdrop: 'static',
    keyboard: false
});
$('.post-job').click(function (event){
    var options = {
    url: "job/new",
    title:'Post your requirements',
    buttons:[],
    size: eModal.size.lg,
    useBin: true
    };
    eModal.iframe(options);
});