Actually there's yet another way to do it, using the dialog widget
directly:
You can get the Dialog Widget thus
$("#example").dialog(dialogOpts);
$dlgWidget = $('#example').dialog('widget');
and then do
$dlgWidget.find(".ui-dialog-titlebar").hide();
to hide the titlebar
within that dialog only
and in a single line of code (I like chaining):
$('#example').dialog('widget').find(".ui-dialog-titlebar").hide();
No need to add an extra class to the dialog this way, just go at it directly. Workss fine for me.