All three: mscAlert , mscPrompt and mscConfirm support similar APIs as shown for mscConfirm

mscConfirm

Simplest mscConfirm(title, okCallback)

mscConfirm("Delete?",function(){ alert("Post deleted"); });

With subtitle mscConfirm(title, subtitle, okCallback)

mscConfirm("Delete", "Are you sure you want to delete this post?", function(){ alert("Post deleted"); });

All arguments mscConfirm(title, subtitle, okCallback, cancelCallback)

mscConfirm("Delete", "Are you sure you want to delete this post?", function(){ alert("Post deleted"); }, function() { alert('Cancelled'); });

As an object mscConfirm(object)

mscConfirm({ title: 'License', subtitle: 'Do you accept the licese agreement?', // default: '' okText: 'I Agree', // default: OK cancelText: 'I Dont', // default: Cancel, dismissOverlay: true, // default: false, closes dialog box when clicked on overlay. onOk: function() { alert('Awesome.'); }, onCancel: function() { alert('Sad face :( .'); } });

mscPrompt

As an object mscPrompt(object)

mscPrompt({ title: 'Subscribe', subtitle: 'Enter your email to subscribe to the newsletter', // default: '' okText: 'Subscribe', // default: OK cancelText: 'Cancel', // default: Cancel, placeholder: 'Your email here', // default: empty, placeholder for input text box onOk: function(val) { mscAlert("Your email: "+val+" has subscribed to the newsletter."); }, onCancel: function() { mscAlert(":( You cancelled on me."); } });

mscAlert

Simplest mscAlert(title)

mscAlert("Hello World");

As an object mscAlert(object)

mscAlert({ title: 'Done', subtitle: 'You have subscribed to the mailing list.', // default: '' okText: 'Close', // default: OK });

With new lines and carriage returns mscAlert(object)