您的位置:首页 > Web前端 > BootStrap

jquery.bootstrap.teninedialog.js使用说明

2013-10-30 16:12 351 查看

jquery.bootstrap.teninedialog.js使用说明

不支持调用远程文件

GitHub 下载插件 压缩版

引入jquery、bootstrap和jquery.bootstrap.teninedialog.js插件文件

完整例子代码:

$.teninedialog({
title:'系统提示',
content:'确认删除本条记录?',
showCloseButton:true,
otherButtons:["确定","取消"],
otherButtonStyles:['btn-primary','btn-primary'],
bootstrapModalOption:{keyboard: true},
dialogShow:function(){
alert('即将显示对话框');
},
dialogShown:function(){
alert('显示对话框');
},
dialogHide:function(){
alert('即将关闭对话框');
},
dialogHidden:function(){
alert('关闭对话框');
},
clickButton:function(sender,modal,index){
alert('选中第'+index+'个按钮:'+sender.html());
$(this).closeDialog(modal);
}
});

运行例子

最简单的调用

$.teninedialog({
title:'系统提示',
content:'确认删除本条记录?'
});

运行例子

参数配置

//调用方式
$.teninedialog(options);
/**********************************/
//options 配置
var defaults = {
title:'标题',
content:'内容',
showCloseButton:true,//显示关闭按钮
otherButtons:[],//其他按钮文本,样式默认,["确定","取消"]
otherButtonStyles:[],//其他按钮的样式,['btn-primary','btn-primary'],bootstrap按钮样式
bootstrapModalOption:{},//默认的bootstrap模态对话框参数
dialogShow:function(){},//对话框即将显示事件
dialogShown:function(){},//对话框已经显示事件
dialogHide:function(){},//对话框即将关闭
dialogHidden:function(){},//对话框已经关闭事件
clickButton:function(sender,modal,index){}//选中按钮的序号,排除关闭按钮。sender:按钮jquery对象,model:对话框jquery对象,index:按钮的顺序,otherButtons的数组下标
}

站长统计 彼岸之远
内容来自用户分享和网络整理,不保证内容的准确性,如有侵权内容,可联系管理员处理 点击这里给我发消息
标签: