I am currently developing a form builder and I would like to customize the appearance, specifically changing the color of the text. I want the text to be white when the class is set to active, and black when the class is not active.
Is there a way to achieve this using two generated classes?
I came across some information on a forum but it doesn't seem to be working for me:
$('.game-star').addClass('game-star2').removeClass('game-star');
.game-star ul li h3 {
font-size:14px;
color:#fff;
line-height:24px;
float:left;
font-weight:100;
margin-top:8px;
}
.game-star2 ul li h3 {
font-size:14px;
color:#fff;
line-height:24px;
float:left;
font-weight:100;
margin-top:8px;
}
<div class="game-star" style="height: 198px; overflow: hidden;">
<ul>
<li class="Active">
<div class="game-star-icon"></div>
<h3 class="winner-name">Major Millions<br>
RMB 1000.00</h3>
</li>
<li>
<div class="game-star-icon"></div>
<h3 class="winner-name">Major Moolah<br>
RMB 3,266.41</h3>
</li>
<li>
<div class="game-star-icon"></div>
<h3 class="winner-name">Major Moolah Isis<br>
RMB 4,982.78</h3>
</li>
<li>
<div class="game-star-icon"></div>
<h3 class="winner-name">发大财<br>
RMB 8,888.88</h3>
</li>
<li>
<div class="game-star-icon"></div>
<h3 class="winner-name">我发我发我发发发<br>
RMB 9,999.99</h3>
</li>
</ul>
</div>
my CSS :