I have a custom css for a text layer:
.testColor{
color:blue;
}
and I want to invoke that css class from the callback of a button using jQuery:
jQuery("#btn1").click(function(){
jQuery("#text1").addClass("testColor");
})
or to set the color of the text, this way:
jQuery("#btn1").click(function(){
jQuery("#text1").css("color", "blue");
})
But when I press the button, the text changes briefly from white to blue, and becomes white again.
What can I do to force the css styles on callback action from the button?