码迷,mamicode.com
首页 > 其他好文 > 详细

bootstrap-dialog插件的使用

时间:2016-10-09 19:43:57      阅读:450      评论:0      收藏:0      [点我收藏+]

标签:

官网文档:http://nakupanda.github.io/bootstrap3-dialog

BootstrapDialog.show({

message: ‘Hi Apple!‘,

message: ‘You can not close this dialog by clicking outside and pressing ESC key.‘,

closable: true, //是否可关的图标

closeByBackdrop: false, //点击空白处是否关掉

closeByKeyboard: false,//使用键盘上的esc键是否关掉

buttons: [{

label: ‘Close the dialog‘,

action: function(dialogRef){ dialogRef.close(); }

}]

});

BootstrapDialog.show({

message: ‘Hello world!‘,

onshow: function(dialogRef){

 alert(‘Dialog is popping up, its message is ‘ + dialogRef.getMessage());

},

onshown: function(dialogRef){

alert(‘Dialog is popped up.‘);

},

onhide: function(dialogRef){

alert(‘Dialog is popping down, its message is ‘ + dialogRef.getMessage());

},

onhidden: function(dialogRef){

alert(‘Dialog is popped down.‘);

}

});

//onshow正在加载的时候触发,元素可以获得,但是页面没有加载,

onshown dialog加载完成后触发

onhide dialog正在隐藏时触发

onhiden dialog隐藏后触发

技术分享

 

bootstrap-dialog插件的使用

标签:

原文地址:http://www.cnblogs.com/windseek/p/5943397.html

(0)
(0)
   
举报
评论 一句话评论(0
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!