i have the following anchor tag thats embedded dynamically to a <ul> tag, when the user clicks on the word TEST i want the checkmark to change colour to blue,i tried the following but its not working,what am i doing wrong?
.checkmark{
display: inline-block;
    width: 22px;
    /* height: 22px; */
    height: 17px;
    -ms-transform: rotate(45deg);
    -webkit-transform: rotate(45deg);
    transform: rotate(45deg);
    margin-left: 50%;
    margin-bottom: 1px;
}
.checkmark:before {
    content: '';
    position: absolute;
    width: 3px;
    height: 9px;
    background-color: #ccc;
    left: 11px;
    top: 6px;
}
.checkmark {
    cursor: pointer;
}
 .checkmark:after {
        content: '';
        position: absolute;
        width: 3px;
        height: 3px;
        background-color: #ccc;
        left: 8px;
        top: 12px;
    }
input[type="checkbox"]:checked + .checkmark:before,
input[type="checkbox"]:checked + .checkmark:after {
    background-color: blue;
}<a class="internal" data-destination="local" dataid="66027" data-nodeid="undefined" ><span><input type="checkbox" style="display:none;" id="cb66027 "></span>TEST<label for="cb66027" class="checkmark"></label></a> 
     
    