Page 1 of 1
how can i change the text color
Posted: Tue Mar 22, 2016 5:26 am
by She
Hi Team,
I need help. i want to change the text color:
For example i want to change the text color if the response is "MO" the color of the text will become "RED". and if "TC" it will remain as "BLACK" please see the screenshot below:
Code: Select all
Inside the JS in Type.text
if(Apperyio("type").text("MO")){
Apperyio("time").css('color','#ff0000');
}
output is:
i hope you can help me here.
Regards,
how can i change the text color
Posted: Wed Mar 23, 2016 7:30 pm
by Serhii Kulibaba
Hello,
Please use JS code below for that:
preif(value === "MO"){
element.css('color','#ff0000');
} /pre
how can i change the text color
Posted: Fri Mar 25, 2016 12:59 am
by She
this is the element of the time?
how can i change the text color
Posted: Fri Mar 25, 2016 5:52 am
by Evgene Karachevtsev
Hello She,
Please try changing your code with the code provided by Sergiy.
how can i change the text color
Posted: Mon Mar 28, 2016 1:03 am
by She
Yes i already tried it please see screenshot below:
the color red must the time if the text is MO.
how can i change the text color
Posted: Mon Mar 28, 2016 1:43 am
by She
and i tried the following code
if(value.Type === "MO"){
element.css('color','#ff0000');
}
still no luck,
thank you
how can i change the text color
Posted: Mon Mar 28, 2016 6:56 am
by Serhii Kulibaba
If you need to change the color of the time element - plese remove JS from the mapping to the label "Type" and add JS to the listitem component:
preif(value.Type === "MO"){
element.find("name=time").css('color','#ff0000');
} /pre
how can i change the text color
Posted: Mon Mar 28, 2016 1:51 pm
by She
Hi Sergiy,
I already tried this but there's an error showing please see screenshots below:
Thank you for helping,
how can i change the text color
Posted: Mon Mar 28, 2016 1:58 pm
by She
Hi Sergiy,
Thank you for helping me, i already figured it out:
just incase someone needed this please see the code below. i've just change something
code
if(value.LogType === "MO"){
element.find("[name='time']").css('color','#ff0000');
}
/code
Best Regards,
how can i change the text color
Posted: Mon Mar 28, 2016 2:01 pm
by Evgene Karachevtsev
Hello She,
Thank you for the update and sharing!