Alright, I didn't know you had different id's for the other elements
too. Ok there are a couple of things you can do. One, obviously, is
doing it like you currently are, with many lines of code per
element :)
Here are my thoughts to make it dynamic.
$(document).ready(function(){
$('#questions,#questionLink').
hide();
$('[id$=_y]').live('click',function(){
var thiis = $(this).attr('id').charAt(0);
$('[id$=thiis]').show();
$('#1a_y').checked(true);
return false;
});
$('[id$=_n]').live('click',function(){
var thiis = $(this).attr('id').charAt(0);
$('[id$=thiis]').hide();
$('#1a_n').checked(true);
return false;
});
$('#toggle1a').click(function(){
$('#questions').toggle();
return false;
});
});
Copying this code as is, your hide/show should work for all of your
checkboxes or whatever it is for. I haven't touched the "$
('#1a_y').checked(true);" lines, or the toggle stanza, but you should
be able to come up with something following the same logic.
If any of that doesn't make sense or you just want me to explain my
thought process, lemme know. I am always happy to help.
~ross