If I have a checkbox which has this name attribute below:
name="answerName[True]"
How come when I peform this jquery line below that it does not show the checkbox?
$(this).closest('.option').siblings('.answer').find('input[name=answerName[Yes]]').show();
if the name attribute was this:
name="answerNameTrue"
and the jquery was this:
$(this).closest('.option').siblings('.answer').find('input[name=answerNameYes]').show();
then it does show but how come when I put [] brackets around it that it suddenly doesn’t work and not show the check box?
You can use quotation marks: