I have created a checklist that includes checkboxes. I am looking to display some text when all the checkboxes are checked and green. Can someone assist me with writing the code for this functionality?
$(document).ready(function() {
$("i").click(function() {
$(this).css("color", "#5c8c44");
$(this).parent().css("font-weight", "bold");
});
$("#reset").click(function() {
$("i").css("color", "red");
$("li").css("font-weight", "normal");
});
});
ul li {
list-style: none;
}
ul li i {
color: red;
}
<script src="https://cdnjs.cloudflare.com/ajax/libs/jquery/3.3.1/jquery.min.js"></script>
<link rel="stylesheet" href="https://use.fontawesome.com/releases/v5.8.2/css/all.css">
<h2>Checklist</h2>
<ul>
<li><i class="fas fa-check-square"></i> Item 1</li>
<li><i class="fas fa-check-square"></i> Item 2</li>
<li><i class="fas fa-check-square"></i> Item 3</li>
<li><i class="fas fa-check-square"></i> Item 4</li>
<li><i class="fas fa-check-square"></i> Item 5</li>
<li><i class="fas fa-check-square"></i> Item 6</li>
<li><i class="fas fa-check-square"></i> Item 7</li>
<li><i class="fas fa-check-square"></i> Item 8</li>
<li><i class="fas fa-check-square"></i> Item 9</li>
<li><i class="fas fa-check-square"></i> Item 10</li>
</ul>
<button id="reset">Reset checklist</button>
<script src="https://code.jquery.com/jquery-3.4.1.js"></script>