Try to use .prop() instead of .attr()
to set the checked
state of form elements, from the docs:
As of jQuery 1.6, the .attr() method returns undefined for attributes that have not been set. To retrieve and change DOM properties such as the checked, selected, or disabled state of form elements, use the .prop() method.
allDropDownCheckboxes.prop('checked', false);
selectedCheckboxes.prop('checked', true);