Change text color via JS

I would like to be able to change the tab text color depending on what skin is picked. My default text color is black, so looks fine on the built in skins. I have made my own that is a gray/black skin, so the text is hard to read.



if (TabsSkin==“modern”)

text=“black”;

else

text=“white”;



change css color here using JavaScript





.dhx_tab_element div{

font-family:Tahoma;

font-size:8pt;

color:#000000; <-------- Change this color using Javascript

}

There is no way to acces those style through js code
Are you plan to change the skin color dynamically after page loading?
If you need to change setting only once per page, you can just add style block at the start of the page and redefine style in necessary way
.dhx_tab_element div{
color:#000000 !important;
}

If you need a way to have few toolbars with different skins in same time - please contact us directly at support@dhtmlx.com we will provide dev. build which have such capability.


What about adding it to tabs.setSkinColors()?  Make it much easier and more user friendly.  Won’t have to alter css.  Or in my case, make a second one, do check, load appropriate one.



 


The next version of tabbar will allow to define custom rules for different skins, so you can have


.dhx_tab_element div{


font-family:Tahoma;
font-size:8pt;
color:#000000;
}
.skin_modern .dhx_tab_element div{
color:#FFFFFF;
}

storing color settings in CSS is a more flexible way on my opinion.
Technically you can change color for some specific tab in current version as
tabbar.setCustomStyle(tabID,"","",“custom_css_class”);