I have different type of Popup / InfoTemplate in my map. For certain type of popups, I want to remove the title completely. In other words, I can do something like "if popup info is for feature type A, then remove title; else keep title.".
My InfoTemplate are created with
new InfoTemplate(.....)
I have used CSS to remove the title bar, like below, but this removes title for ALL popups.
.InfoWindowWidget .title { display: none; }
I am using Javascript API 3.13.
Thanks.
I should also add that I want to remove the entire title bar, not just the title words.
If you have a set method of determining the popup "class", e,g. only features from a certain layer is returned, you can still do it in CSS:
.InfoWindowWidget .classA .title { display: none; }
To set the additional class of the popup:
var myIW = document.getElementsByClassName('InfoWindowWidget')[0];
myIW.className += " classA";
And to remove the additional class again:
var myIW = document.getElementsByClassName('InfoWindowWidget')[0];
myIW.className = "InfoWindowWidget";