EasyUI Forum

General Category => EasyUI for jQuery => Topic started by: Opan Mustopah on December 18, 2015, 03:12:42 AM



Title: add custom button in messager.confirm
Post by: Opan Mustopah on December 18, 2015, 03:12:42 AM
title says all, it is possible to do that?
as far as i know, the only properties avaiable is "OK" and "Cancel" button.

thanks in advance


Title: Re: add custom button in messager.confirm
Post by: stworthy on December 18, 2015, 08:39:23 AM
You can redefine the 'buttons' property to custom the message buttons.
Code:
var dlg = $.messager.confirm({
    title: 'Confirm',
    msg: 'Are you sure?',
    buttons:[{
        text: 'Button1',
        onClick: function(){
            dlg.dialog('destroy')
        }
    },{
        text: 'Button2'
    },{
        text: 'Button3'
    }]
});