views:

25

answers:

1

How do you add an icon (floated to the left on the title bar, like windows in Windows) to a jQuery UI Dialog?

+1  A: 

I haven't tried it, but my suspicion is that you could just set raw HTML in the .title option and it would render correctly.

EDIT: I made a small jsFiddle (http://jsfiddle.net/sWs3N/) that shows this working. There is no style on the dialog, but if you look at the raw HTML you can see the html in the title.

Alastair Pitts
Thanks! I had already tried adding html into the title attribute of the div, but I didn't like it in there. This method is cleaner. Thanks again.
Brett