Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

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

like image 363
Qcom Avatar asked Dec 29 '22 08:12

Qcom


1 Answers

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>'
});​
like image 74
Nick Craver Avatar answered Jan 15 '23 16:01

Nick Craver