jqueryjquery-uijquery-ui-dialogtitle

jQuery ui dialog image for the title


Is it possible when specifying a jQuery UI dialog box, to have an image be placed for my title instead of just plain text?

Thanks


Solution

  • You can provide any HTML as the title option, like this:

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

    You can see an example in action here


    Or, as another demo to annoy the hell out of your users, you could do this:

    $("<div />").dialog({
      title: '<marquee>Hello</marquee>'
    });​