jeudi 30 juin 2016

Remove title bar without the cross button from jQuery Dialog box

I have seen multiple answers for this question but have not been able to find any that work.

How do i remove the title bar from a jQueryUI Dialog box while keeping the close button.

I have tried this and it does not work. Also it is not a good solution.

$("#example").dialog(dialogOpts);
// remove the title bar
$(".ui-dialog-titlebar").hide();

I was able to follow this and get rid of the title bar. But this also takes away the close button and because there is no title bar, the dialog box is not draggable anymore.

jquery UI dialog: how to initialize without a title bar?

I tried to follow this fiddle here to get rid of the title bar and keep the close button.

http://jsfiddle.net/NK2qm/2/

However, this modifies the CSS for all dialog boxes and adds a triangle below the dialog box. I want this to happen only for one class of dialog box and minus the triangle at the bottom.

Can someone reply to this question with a fiddle showing how to do it?

Thanks.

Aucun commentaire:

Enregistrer un commentaire