jQuery UI - change CSS background image -> .ui-widget-header

I use a theme that I would like to switch the header background image to a different image color which I have. The image is


Open in new window

Can you point out where in the following code I would insert it. This is the dialog. I know how to change it for ALL the dialog, - I can go in the CSS stylesheet. But I need it dynamic.

			autoOpen: false,
			modal: true
			html: "<p>test</p>",
			buttons: [{ 
				text : _yes, 
				click :function() {
						var FaveToDelete = $("select[name=selectFavorite]").val();	
						var ViewBasedOn = $("#ViewBasedOnSelect").val().split("_",3);
						   type: "POST",
						   url: "/aaMain/ajaxFavoriteDelete.php?datagroup="+ViewBasedOn[2]+"&FaveToDelete="+FaveToDelete,
						   //data: $("form[name=filters]").serialize(),
						   success: function(msg){	document.filters.runButton.value=1;
						// then close

				text : _no,
				click: function() {
			autoOpen: false,
			modal: true,
			open: function() {
				var container = $("#dialog-DeleteFave").parent();
				$(".ui-button-text:contains('" + _no + "')", container).parent("button.ui-button").focus();
				$(".ui-button-text:contains('" + _yes + "')", container).parent("button.ui-button").blur();
		$( "#deleteFave" )
					.click(function() {
						var FaveToDelete = $("select[name=selectFavorite]").val();	
						$("#dialog-DeleteFaveNoChoice").html(strIcon+" "+_warningFavNoChoice).dialog('open');
							var FaveToDeleteText = $("select[name=selectFavorite]>option:selected").text();
							$("#dialog-DeleteFave>p").html(strIcon + _warningRemove + " " + "<b>"+ FaveToDeleteText +"</b>" + " ?");
							$( "#dialog-DeleteFave" ).dialog( "open" );

Open in new window

Who is Participating?

[Product update] Infrastructure Analysis Tool is now available with Business Accounts.Learn More

I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

RobOwner (Aidellio)Commented:
In the open function you can try and access the class directly and change its settings:


and to make it completely dynamic you could use ajax call to get the image when the dialog is set up.  it would depend on how the theming changes.

some good info here: http://docs.jquery.com/UI/Dialog#theming

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
gbeaulacAuthor Commented:
No that did not work,

I will check the link out.
RobOwner (Aidellio)Commented:
When are you changing the theme?  What is the trigger for it to change?
gbeaulacAuthor Commented:
@ tagit

I tried a variation of what you mentioned and it worked.

gbeaulacAuthor Commented:
the variation is this:

$(".ui-widget-header").css('background','url(../css/images/ui-bg_gloss-wave_75_2191c0_500x100.png) 50% 50% repeat-x');
      $(".ui-widget-header").css('border','1px solid #4297d7');
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today

From novice to tech pro — start learning today.