I want to be able to toggle the'text decoration' set to 'strike-through' on click. (Also, if anyone can point me in the right direction of how to make it go to the bottom of the list once clicked that would be helpful.)
$(".player-name-wrapper").children().click(function() {
if ($(this).css.style.text - decoration == "line-through") {
$(this).css("text-decoration", "none");
} else {
$(this).css("text-decoration", "line-through");
}
});
<script src="https://cdnjs.cloudflare.com/ajax/libs/jquery/3.3.1/jquery.min.js"></script>
<div id="qb-wrapper" class="position-wrapper hide-wrapper">
<h4 class="box-heading">QB</h4>
<div id="qb-names" class="player-name-wrapper">
<a>QB Player Name</a>
<a>Player Name</a>
<a>Player Name</a>
<a>Player Name</a>
<a>Player Name</a>
<a>Player Name</a>
</div>
</div>