if a radio button is selected, i want a div to either show or hide. here is the code:
// add event to hide unimportant details when var is disabled and show when enabled
$('#companyVar' + companyVarID + 'Enabled').change(function() {
$('#companyVar' + companyVarID + 'Unimportant').fadeIn("slow");
});
$('#companyVar' + companyVarID + 'Disabled').change(function() {
$('#companyVar' + companyVarID + 'Unimportant').slideUp("slow");
});
it should work (i alert tested that the event actually runs), but i think that for some reason, the variable companyVarID
is unknown inside the event function. how can i fix this?