不支持IE8及以下浏览器。
//alert提示框 $.gDialog.alert("Lorem ipsum dolor sit amet, consectetur adipiscing elit. Suspendisse libero erat, scelerisque sit amet dolor nec, euismod feugiat massa.", { title: "Alert Dialog Box", animateIn: "bounceIn", animateOut: "bounceOut" }); }); //带表单 confirm $('.demo-2').click(function(){ $.gDialog.prompt("jQuery", "www.jq22.com", { title: "Prompt Dialog Box", required: true, animateIn : "rollIn", animateOut: "rollOut" }); }); //confirm 操作提示 $('.demo-3').click(function(){ $.gDialog.confirm("Are You Sure?", { title: "Confirm Dialog Box", animateIn : "bounceInDown", animateOut: "bounceOutUp" });
$.gDialog.prompt要提交数据,有方法可以跳转URL吗
function showOrderPayAlert() { $.gDialog.confirm("xxxxx", { title: "支付确认", cancel: "取消", confirm: "已完成支付", onSubmit: function payAlertConfirm() { var t = setTimeout("turnToPayResult()", 1000); }, animateIn: "bounceIn", animateOut: "bounceOut" }); }
m._OPTIONS = { title: false, cancel:false, confirm:false, animateIn : false, animateOut : false, onSubmit : false, onCancel : false, required: false, };
m.tplBase += "<div class=\"gdialog-button-group\">{{BUTTON_CANCEL}} <button class=\"button button-ok\">{{ok}}</button></div>";
if (options.cancel) { t = t.replace("{{cancel}}",options.cancel); }else { t = t.replace("{{cancel}}","取消"); } if (options.confirm) { t = t.replace("{{ok}}",options.confirm); }else { t = t.replace("{{ok}}","好的"); }回复
confirm 如何返回boolean值,貌似点取消和确认没返回值怎么判断。。。。。