How to change text color and size in a table

If you're a new user of AppGini, feel free to ask general usage questions, or look for answers here.
Post Reply
ushay
Veteran Member
Posts: 54
Joined: 2020-06-26 21:30

How to change text color and size in a table

Post by ushay » 2020-06-27 14:19

Hello,

here is my script:

<script>

$j(function(){
$j('.takalot-Status').each(function(){
var status = $j(this).text();
if(status == 'In service' ){
$j(this).css("background-color", "#00ff7f");
}
if(status == 'not in service!!!' ){
$j(this).css("border-color", "#ffa500");
}
})
})
</script>
<script>

i have managed in this script to change the color of the background and the border of one off the cells in my table.
but somehow i can't change the color of the text and i also wish to change it to BOLD, i have tried : "$j(this).css("border-color", "#ffa500");" but it dose'nt effect the text.

can someone please help?

pbottcher
AppGini Super Hero
AppGini Super Hero
Posts: 1635
Joined: 2018-04-01 10:12

Re: How to change text color and size in a table

Post by pbottcher » 2020-06-27 18:59

Hi,

for the text use

$j(this).children('a')

eg.

$j(this).children('a').css('font-weight',"bold")
Any help offered comes with the best of intentions. Use it at your own risk. In any case, please make a backup of your existing environment before applying any changes.

ushay
Veteran Member
Posts: 54
Joined: 2020-06-26 21:30

Re: How to change text color and size in a table

Post by ushay » 2020-06-27 21:49

thank you very much, i will try it.

ushay
Veteran Member
Posts: 54
Joined: 2020-06-26 21:30

Re: How to change text color and size in a table

Post by ushay » 2020-06-27 22:24

thank you, it worked well!!!
if i may, one more question.
what if i want to change the color of one of the headlines in the TableHeader?
how sould query it? i wish to change it to red color.

Post Reply