edited and consolidated answer:
free format question named test; has a checkbox variable named c1 with 2 options
question html code:
<table id="table1" cellspacing="20">
<tr>
<td class="input_cell clickable">
[%CheckSelect(test_c1, 1)%]
</td>
<td class="tdHidden">
When checked you see this!
</td>
</tr>
<tr>
<td class="input_cell clickable">
[%CheckSelect(test_c1, 2)%]
</td>
<td class="tdHidden">
When checked you see this!
</td>
</tr>
</table>
advanced/head tag code:
<style type="text/css">
.tdHidden
{
visibility: hidden
}
</style>
<script type="text/javascript">
function getNextSibling(elem)
{
var nextSib = elem.nextSibling;
while (nextSib.nodeType !=1 )
{
nextSib = nextSib.nextSibling;
}
return nextSib;
}
//assign an onclick even handler to the checkboxes
window.onload=function()
{
var divs = document.getElementById('table1').getElementsByTagName('div');
for(i=0; i < divs.length; i++)
{
if (divs[i].className == "graphical_select checkbox")
{
divs[i].onclick=function()
{
var nextTd = getNextSibling(this.parentNode) ; //get the next td in this row
if(this.className == "graphical_select checkbox"){ nextTd.style.visibility = 'visible'; }
if(this.className == "graphical_select checkboxselected"){ nextTd.style.visibility = 'hidden'; }
}
}
}
}
</script>
it would be a nice addition if you also apply the method in
https://sawtoothsoftware.com/forum/555/tds-are-still-clickable-even-the-inputs-are-hidden-disabled to make your TD's not clickable. because with my proposed code here, the text is not shown if the respondents click the thin area just outside of the checkbox. FYI :)