Last Updated: February 25, 2016
· napotopia

Adding Custom Classes to a jQuery Dialog Button

If you need to add a custom class to a button in a jQuery dialog there's a property class</code> that you can specify to get your custom classes:

    {title   : 'Custom Dialog Title', 
     buttons : [{text  : 'Cancel', 
                 click : function() {
                 class : 'custom-class'

<div id="customDialog">Some content</div>