function swapSelectAllButtonText(button, elements) {
    if ( allCheckboxesChecked(elements) ) {
      button.text(button.data('deselect-text'));
    } else {
      button.text(button.data('select-text'));
    }
  }
// "Select all" when any are unchecked
"Select all" when any are unchecked
" Select all " when any are unchecked
function swapSelectAllButtonText(button, elements) {
    if ( allCheckboxesChecked(elements) ) {
      button.text(button.data('deselect-text'));
    } else {
      button.text(button.data('select-text'));
    }
  }
function swapSelectAllButtonText ( button , elements ) { if ( allCheckboxesChecked ( elements ) ) { button . text ( button . data ( 'deselect-text' ) ) ; } else { button . text ( button . data ( 'select-text' ) ) ; } }
"Select all" when any are unchecked
" Select all " when any are unchecked