Thomas Thomas - 1 month ago 19
jQuery Question

Need to change jquery dialog title bar image

I tried to change the jQuery dialog title bar image using the below code but it does not work.

My dialog & title bar image look like this:

enter image description here

$("#dialog").dialog({
title: '<img src="myImage.jpg" />'
});​​​​​​​​​​​


Any advise on how to change it? Thanks

Answer Source

you have to add a CSS rule:

.ui-dialog-titlebar{
    background:url(http://www.elementalsurface.com/beech-wood.jpg);
}​

see the demo