Change popup background or title bar color dynamically

716
1
04-03-2013 04:46 AM
by Anonymous User
Not applicable
Original User: abalder

I have three different types of data that are symbolized by three different colors. I would like to have the popup�??s background or title bar color change corresponding to the type of data the user clicks on. For example if the user clicks on a green point I want the background or title bar of the popup to be green. I understand I can change these items via CSS but how does one go about doing this on the fly?
0 Kudos
1 Reply
ShadCampbell
New Contributor III
You can dynamically add and remove css classes to elements with dojo...

require(["dojo/dom-class"], function(domClass){
    // Add a class to some node:
    domClass.add("someNode", "newClass");
});


or to remove...
domClass.remove("someNode", "someClass");


Perhaps set these prior to the setFeatures method?  Not sure exactly...
-Shad
0 Kudos