JSFiddle - React, Tailwind, and code Playground

by Andy Novocin

HTML

<div class="myAccountCheckboxHolder" id="showCheckoutHistoryCheckbox">
    <input tabindex="40" checked="checked" id="showCheckoutHistory" name="showCheckoutHistory" type="checkbox"/>
        <label for="showCheckoutHistory" class="checkLabel">Show my checkout history</label>
    </div>

JavaScript

$("#showCheckoutHistory").change(function(event){
        if (this.checked){
            alert("You have elected to show your checkout history.");
        } else {
            alert("You have elected to turn off checkout history.");
        }
    });