JSFiddle - React, Tailwind, and code Playground

by taoist

HTML

<ul class="order">

		
<li class="added" class="space">
<span>Hi mom</span>
<span class="checkboxFive">
<input type="checkbox" value="1" id="checkbox-1" name="" />
<label for="checkbox-1"></label>
</span>

<span class="checkboxFour">
<input type="checkbox" value="1" id="checkbox-2" name="" />
<label for="checkbox-2"></label>
</span>
</li>
</ul>

CSS

.strike1 {
    text-decoration: line-through;
}

JavaScript

$(function(){ 

  $('ul').on('click', '.checkboxFive', function() {
        
        $(this).closest('li').toggleClass('strike1');

    });


});