My code is not changing the text color of the label element to #ffffff
. No errors are logged.
JS Code
$(document).ready(() => {
$('.label').on("click", () => {
$(this).css("color", "#ffffff")
})
})
HTML Code
<div id="q1">
<img src="lizerds/l2.jpeg" class="img"/>
<div>
<div class="radioWrapper">
<label class="label">
<input type="radio" id="q1Snake" class="radio" name="q1radio">
Snake
</label>
</div>
<div class="radioWrapper">
<label class="label">
<input type="radio" id="q1Lizard" class="radio" name="q1radio">
Legless Lizard
</label>
</div>
</div>
</div>