$.msgBox({
title: "Are You Sure",
content: "Would you like a cup of coffee?",
type: "confirm",
buttons: [{ value: "Yes" }, { value: "No" }, { value: "Cancel"}],
success: function (result) {
if (result == "Yes") {
alert("One cup of coffee coming right up!");
}
}
});
$.msgBox({
title: "Ooops",
content: "Ohh dear! You broke it!!!",
type: "error",
buttons: [{ value: "Ok" }],
afterShow: function (result) { alert("Message has been shown!"); }
});
$.msgBox({
title: "Ooops",
content: "Ohh dear! You broke it!!!",
type: "error",
beforeClose: function () { alert("Message will be closed!"); },
showButtons:false,
opacity:0.9
});
jQuery.msgBox is a plug-in to make smarter displaying messages. Also usage of the plug-in is so easy. You just need to add following
files to your page as shown below and the images named 'alert.png', 'confirm.png', 'error.png', 'info.png', 'msgBoxBackGround.png' used by plug-in to 'Images' folder in the root directory. That's all!