I need to append this element <span>my custom text</span>
inside the <span class="tc-label tm-label">1</span>
element when the checkbox#tmcp_choice_3_0_8 is checked.
Problem is that I can get target the span element by its class 'tm-label' because there are other elements with the same class.
My idea is to get the parent html of the checkbox and then to target the 'span.tm-label' but I can't get to get the parent. I tried with:
aa = $("input#tmcp_choice_3_0_8");
alert( aa.parent());
But I just get an alert with this text: "[object Object]"
Real HTML
<label for="tmcp_choice_3_0_8">
<input class="tmcp-field tmhexcolor_3_0_8 tm-epo-field tmcp-checkbox tcenabled" name="tmcp_checkbox_3_0" data-limit="" data-exactlimit="" data-minimumlimit="" data-image="" data-imagec="" data-imagep="" data-imagel="" data-image-variations="[]" data-price="" data-rules="["0"]" data-original-rules="["0"]" data-rulestype="[""]" value="1_0" id="tmcp_choice_3_0_8" tabindex="8" type="checkbox" disabled="disabled">
<span for="tmcp_choice_3_0_8"></span>
<span class="tc-label tm-label">1</span>
</label>