I have this jQuery:
$(document).ready(function() {
$("input[type=radio]").change(function()
{
var divId = $(this).attr("id");
if ($(this).is(":checked")) {
$("." + divId).show();
}
else {
$("." + divId).hide();
}
});
$("input[type=radio]").change();
});
divs should show/hide depending if inputs are checked/unchecked
EDIT: I should mention that using checkboxes the divs DO show and hide, but with radios they just show :(.
It works with checkboxes but not radio buttons, why is that?