Bootstrap - Open modal while another modal is open and keep 'modal-open' class in body -


i want open new bootstrap modal when click button inside open modal. works fine, problem 'modal-open' class of body tag disappears, , scroll entire page appears.

when click button in modal, in code-behind this:

scriptmanager.registerstartupscript(upmain, typeof(updatepanel), "tipo descuento seleccionado", "$('#dtosmodal').modal('show'); $('#tipodtomodal').modal('hide');", true); 

what can keep class in body tag?

thank much!

edit: if change

$(document)    .on('show.bs.modal', '.modal', function () { $(document.body).addclass('modal-open') })     .on('hidden.bs.modal', '.modal', function () { $(document.body).removeclass('modal-open') }) 

in bootstrap.js for

$(document)     .on('show.bs.modal', '.modal', function () { document.body.classname += ' modal-open'; })     .on('hidden.bs.modal', '.modal', function () { document.body.classname = document.body.classname.replace(" modal-open", ""); }) 

i solve problem. other more 'orthodox' ideas?

any other more 'orthodox' ideas?

yes have, 'orthodox' 1 : )

// close modal anyway $('#' + modalname).modal('hide'); settimeout(function() {     // needs in timeout because wait bg leave     // keep class modal-open body users can scroll     $('body').addclass('modal-open'); }, 400); 

i'm working http://bootboxjs.com/ there callback fires after pressed action button. not wait until background disappeared.

for twitter bootstrap modal seem proper solution callback. see here: how handle modal closing event in twitter bootstrap?


Comments

Popular posts from this blog

python - pip install -U PySide error -

arrays - C++ error: a brace-enclosed initializer is not allowed here before ‘{’ token -

cytoscape.js - How to add nodes to Dagre layout with Cytoscape -