1
2
3
4
5
6
7
8
|
< div class = "modal fade" id = "loadingModal" > < div style = "width: 200px;height:20px; z-index: 20000; position: absolute; text-align: center; left: 50%; top: 50%;margin-left:-100px;margin-top:-10px" > < div class = "progress progress-striped active" style = "margin-bottom: 0;" > < div class = "progress-bar" style = "width: 100%;" ></ div > </ div > < h5 >正在加載...</ h5 > </ div > </ div > |
1
2
3
4
|
//顯示 $( "#loadingModal" ).modal( 'show' ); //隱藏 $( "#loadingModal" ).modal( 'hide' ); |
1
2
3
4
5
6
7
8
9
|
//使點擊空白處遮罩層不會消失 $( "#loadingModal" ).modal({backdrop: 'static' }); //按Tab鍵遮罩層不會消失 ,默認值爲true $( "#loadingModal" ).modal({keyboard: false }); //也可以一起運用 //backdrop 爲 static 時,點擊模態對話框的外部區域不會將其關閉。 //keyboard 爲 false 時,按下 Esc 鍵不會關閉 Modal。 $( '#loadingModal' ).modal({backdrop: 'static' , keyboard: false });
|