So I have two checkboxes when clicked separately, will make the bottom section required - How can I make it that the last section is required when both are checked? I can\'t see
LOL, didn't I say to only use one $(document).ready() function?
Anyway, just combine the two conditionals into a third change function.
/* Make checkbox textboxes not required unless checked */
$(document).ready(function() {
$('#rtd3Transaction').change(function() {
if ($('.rtdConfirm').attr('required')) {
$('.rtdConfirm').removeAttr('required');
}
else {
$('.rtdConfirm').attr('required','required');
}
});
$('#rtd3Device').change(function() {
if ($('.rtdConfirm').attr('required')) {
$('.rtdConfirm').removeAttr('required');
}
else {
$('.rtdConfirm').attr('required','required');
}
});
$('#rtd3Transaction, #rtd3Device').change(function() {
if ($('#rtd3Transaction').checked && $('#rtd3Transaction').checked) {
$('.rtdConfirm').attr('required','required');
}
else {
$('.rtdConfirm').removeAttr('required');
}
});
});
If that doesn't work, post the rest of your code and I'll see what I can do.