The JS code below will show a dnn confirm dialog upon click on any button with my-Button class. Pay attention to isButton option on initialization and the isTrigger parameter on button click.
//initialization
$(".my-Button").dnnConfirm({
text: "Confirm Message",
title: "Confirm",
isButton: true
});
//button click handler
$(".my-Button").click(function (e, isTrigger) {
if (isTrigger) {
// Your code here
}
return false;
});
Monday, July 15, 2013
Subscribe to:
Post Comments (Atom)
What would be a good example of code you might want to run in the isTrigger IF statement?
ReplyDeleteDepending on what you want to accomplish, for example if its a delete button you can add code to call your delete function.
Delete