jQuery网页顶部弹窗提示层插件jQuery固定顶部错误提示层插件

jQuery网页顶部弹窗提示层插件jQuery固定顶部错误提示层插件4209
调用例子成功提示
$("body").overhang({type: "success",message: "Woohoo! It works!"});
可以关闭提示层
$("body").overhang({type: "error",message: "Whoops! Something went wrong!",closeConfirm: true});
自动关闭提示层
$("body").overhang({type: "info",message: "This message will close in 5 seconds!",duration: 5,upper: true});
点击弹出层上的按钮带回调的、
$("body").overhang({type: "confirm",primary: "#40D47E",accent: "#27AE60",yesColor: "#3498DB",message: "Do you want to continue?",callback: function () {var selection = $("body").data("overhangConfirm");var response = selection ? "yes" : "no";alert("You made your selection of " + response);}});
弹出层上也可以使用HTML代码
var snapchatIcon = '<i class="fa fa-snapchat-ghost" style="color: #FFFC00" aria-hidden="true"></i>';var snapchatNote = ' Add "thepaulkr" on snapchat!';$("body").overhang({type: "confirm",primary: "#333333",accent: "#FFFC00",message: snapchatIcon + snapchatNote,custom: true,html: true,callback: function () {var selection = $("body").data("overhangConfirm");if (selection) {  window.open("https://sc.chinaz.com/", "_blank");} else {  alert("Maybe next time then...");}}});

也许你还喜欢