I have this in a css file
.datagrid table tbody td { color: #00496B; border-left: 1px solid
#E1EEF4; font-size: 16px ;font-weight: normal; }
how can I use javascript to change the font-size dynamically? this following codes worked on all td but how can I access the specific td under .datagrid? any help is appreciated.
css('td', 'font-size', '9px');
function css(selector, property, value) {
for (var i=0; i<document.styleSheets.length;i++) {//Loop through all styles
//Try add rule
try { document.styleSheets[i].insertRule(selector+ ' {'+property+':'+value+'}', document.styleSheets[i].cssRules.length);
} catch(err) {try { document.styleSheets[i].addRule(selector, property+':'+value);} catch(err) {}}//IE
}
}
.datagrid table tbody tdinstead?classof the container to one that specifies a larger font. Analogously, for changing a single cell, just add a class (sayhighlight) that would give it a larger fonttd.highlight { font-size: 20px; }