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.
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
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
HTML