Adding dialog button using .data

Adding dialog button using .data


Is it possible to add a dialog button with functions using the .data
method? I've seen .data used to change dialog sizes (ex: $
('#dialog').data('width, dialog', 400);), so I'd like to know if
buttons can be added this way. Thanks.