0
function bookingResults(){
  checkAllRadios("#acknowledgeAll", ".acknowledgeThis");
  checkAllRadios("#confirmAll", ".confirmThis");
  checkAllRadios("#rejectAll", ".rejectThis");
}

When the id is clicked, check all the elements with the class name.

Bongbong
  • 67
  • 8

2 Answers2

0

Regarding $('.acknowledgeThis, .confirmThis, .rejectThis').attr('checked', 'checked'); , that's the old way to do it in jQuery. But if you're using any version 1.6 or higher, the correct way to do it now is this:

$('.acknowledgeThis, .confirmThis, .rejectThis').prop('checked', true);

The attr() setter version has been deprecated since 1.6, and might be removed in a future version.

BenMorel
  • 34,448
  • 50
  • 182
  • 322
BrianFreud
  • 7,094
  • 6
  • 33
  • 50
0

We don't know how your function works. But you can do:

$('.acknowledgeThis, .confirmThis, .rejectThis').attr('checked', 'checked');
David Fells
  • 6,678
  • 1
  • 22
  • 34