I have an xml file that is loaded via jquery to populate a jQuery mobile list. Everything is working great except I need to change the inline styling of the font color on the CDATA font tag dynamically within the page.
I have tried document.getElementById("font").style.color = "#000000"; and I have also tried to override the styling via the external CSS using !important.
Neither of those are working. Does anyone have any other suggestions?
Of course
getElementById()is never going to work as it only targets theidattribute of an element. Can you just givefontanid(like “myID”) and target that instead?Or by using jQuery it would simply be
$('#myID').css('color','#000');As per comments, instead of using an
id, targeting the element directly is just as valid…