Welcome to OStack Knowledge Sharing Community for programmer and developer-Open, Learning and Share
Welcome To Ask or Share your Answers For Others

Categories

0 votes
1.3k views
in Technique[技术] by (71.8m points)

bootstrap css - how to make a modal dialog modal without affecting the background

In bootstrap css, it is possible to display a modal dialog, but I want to be able to make it modal so the UI behind doesn't respond, without having the dark black background shown.

There seems to be no options that allow me to do this on the $("#selector").modal() function.

question from:https://stackoverflow.com/questions/8168746/bootstrap-css-how-to-make-a-modal-dialog-modal-without-affecting-the-backgroun

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome To Ask or Share your Answers For Others

1 Answer

0 votes
by (71.8m points)

To get rid of the backdrop:

After modal initiation

$('#XXX').modal({show:true});

just trigger the code below

 $('.modal-backdrop').removeClass("modal-backdrop");    

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome to OStack Knowledge Sharing Community for programmer and developer-Open, Learning and Share
Click Here to Ask a Question

...