//$(document).on('change','.classtocheckbox',function(event){ // $('.classtoradiobuttons').toggle(); //}The on() function creates an event and it doesn't matter if the page is not fully rendered when created. Using bind (which click is a shortcut for bind('click').. ) will fail if the DOM is not fully loaded. That is why you need to have bind events inside of $(document).ready() event.
> $('#AHYSChk01').click(function() > { > if $('#AHYSChk01').attr('checked') > { $('#YSElig01').show(); > } > else > { $('#YSElig01').hide(); > } > )} >>
>>> div id = "YSElig<<ch>>" style="display:none"> >>> input type="radio" name="py_SpElig_Type<<ch>>" value="SP" <<iif(lnPY_EligType=1,"checked","")>>/><b>AHYS SUB+Spouse</b> >>> input type="radio" name="py_SpElig_Type<<ch>>" value="SUB" <<iif(lnPY_EligType=2,"checked","")>>/><b>AHYS SUB Only</b> >>> div> >>>>>>
>>>>> script type="text/JavaScript" Language = "JavaScript"> >>>>> $('#AHYSChk01').click(function() >>>>> { >>>>> if ($'#AHYSChk01').is(:checked)) >>>>> { $('#YSElig01').show(); >>>>> } >>>>> else >>>>> { $('#YSElig01').hide(); >>>>> } >>>>> } >>>>> >>>>> /script> >>>>>>>>>>where AHYSChknn is the div id for the radiobuttons and AHYSChknn is the checkbox id