Q:

Trouble getting a Jquery dialog box to work

I launch a jquery dialog box that has it's 'normal' color styled as black. Inside the dialog box there is a div (separate to the dialog's main div container) that contains text (say "mickeymouse"). 
I have a javascript variable var=mycolor that holds an html color (the color often changes, just before the dialog box is launched, so the color needs to stay in a variable). 
If var mycolor=red I can't work out how to color the "mickeymouse" text in red (or whatever color mycol currently holds), while leaving the rest of the dialog box contents in its 'normal' black color.
I originally posted the question here but realised afterwards it was too lengthy. Plus, since then I've played around with the dialogClass from jquery and wanted to mention I can't get that to work, so I've posted this as a different question.

A:

I'm not entirely sure what you're looking for…
But if you want to change the colour of the div with the id “disney” using JQuery you can just do
$("#disney").css("color", "yourcolour");

You can then replace "youcolour" with the variable you talked about.

i've butchered some code together to show you what i mean. It will open a dialog and then change the text in it to the colour specified by "myColour"
JavaScript
var myColour = "red"

$(function(){
    $('#dialog').dialog({
        autoOpen: false,
        width: 600,
        buttons: {
            "Ok": function() {
                $(this).dialog("close");
            },
            "Cancel": function() {
                $(this).dialog("close");
            }
        }
    });

    $('#dialog_link').click(function(){
        $('#dialog').dialog('open');
        change();
        return false;
    });

});

function change(){
    $("#newColour").css("color", myColour);
}

HTML
<div id="dialog">
<div>test</div>
<div id="newColour">Text that changes Colour</div>

</div>

<p><a href="#" id="dialog_link" >Open Dialog</a></p>

