
特效分类 | 弹窗/悬浮 | 文件大小 | 未知大小 | 需要授权 | 无需授权 | 是否开源 | 开源 |
详细说明
jQuery弹出提示层插件是一款鼠标点击按钮弹出加载代码。
html
<button type="button" onClick="showLoadingBUtton1()">Loading层</button> <button type="button" onClick="showLoadingBUtton2()">成功层</button> <button type="button" onClick="showLoadingBUtton3()">自动消失提示层</button> <button type="button" onClick="showModalButton1()">警告消息框</button> <button type="button" onClick="showModalButton2()">确认消息框</button>
js
script type="text/javascript"> function showLoadingBUtton1(){ showLoading({ title: "数据加载中。。。", //提示文字 icon: 'loading', // 图标,有效值 "success", "loading", "none" image: '', // 自定义图标的本地路径,image 的优先级高于 icon duration: 50000, //提示的延迟时间,单位毫秒,默认:1500 mask: true, // 是否显示透明蒙层,防止触摸穿透,默认:false success: function(res) { //接口调用成功的回调函数 console.log(JSON.stringify(res)) }, }); setTimeout(function() { hideLoading() }, 2000) } function showLoadingBUtton2(){ showLoading({ title: "数据加载成功", //提示文字 icon: 'success', // 图标,有效值 "success", "loading", "none" image: '', // 自定义图标的本地路径,image 的优先级高于 icon duration: 2000, //提示的延迟时间,单位毫秒,默认:1500 mask: true, // 是否显示透明蒙层,防止触摸穿透,默认:false success: function(res) { //接口调用成功的回调函数 console.log(JSON.stringify(res)) }, }); } function showLoadingBUtton3(){ showLoading({ title: "数据加载。。。", //提示文字 icon: 'none', // 图标,有效值 "success", "loading", "none" image: '', // 自定义图标的本地路径,image 的优先级高于 icon duration: 2000, //提示的延迟时间,单位毫秒,默认:1500 mask: true, // 是否显示透明蒙层,防止触摸穿透,默认:false success: function(res) { //接口调用成功的回调函数 console.log(JSON.stringify(res)) }, }); } function showModalButton1(){ showModal({ title: "温馨提示", //提示的标题 content: "确认要删除吗?", //提示的内容 showCancel: false, //是否显示取消按钮,默认为 true cancelText: '否', //取消按钮的文字,默认为"取消",最多 4 个字符 cancelColor: "#fff", //取消按钮的文字颜色,默认为"#000000" cancelBgColor: '#4c4c4c', //取消按钮的背景颜色 confirmText: '是', confirmColor: '#fff', confirmBgColor: '#55aaff', success: function(res) { if (res.confirm) { console.log('yes'); } else { console.log('no'); } } }); } function showModalButton2(){ showModal({ title: "温馨提示", //提示的标题 content: "确认要删除吗?", //提示的内容 showCancel: true, //是否显示取消按钮,默认为 true cancelText: '否', //取消按钮的文字,默认为"取消",最多 4 个字符 cancelColor: "#fff", //取消按钮的文字颜色,默认为"#000000" cancelBgColor: '#4c4c4c', //取消按钮的背景颜色 confirmText: '是', confirmColor: '#fff', confirmBgColor: '#55aaff', success: function(res) { if (res.confirm) { console.log('yes'); } else { console.log('no'); } } }); } </script>
版权声明:本站资源除特殊标注外均收集自网络或由用户发布,如有侵权请联系删除。
还木有评论哦,快来抢沙发吧~