Is it possible to add icons to the buttons on a jQuery UI Dialog? I\'ve tried doing it this way:
$(\"#DeleteDialog\").dialog({
resizable: false,
hei
Try this line to add the trash icon to the delete button. The sprite has to be in a separate element.
$('.ui-dialog-buttonpane').find('button:contains("Delete")').prepend('');
In order to prevent the icon from appearing on the top of the button:
$('.ui-dialog-buttonpane')
.find('button:contains("Delete")')
.removeClass('ui-button-text-only')
.addClass('ui-button-text-icon-primary')
.prepend('');