src/jquery-tokeninput/jquery-tokeninput.js
function toggle_select_token(token) {
          var previous_selected_token = selected_token;

          if(selected_token) {
              deselect_token($(selected_token), POSITION.END);
          }

          if(previous_selected_token === token.get(0)) {
              deselect_token(token, POSITION.END);
          } else {
              select_token(token);
          }
      }
function toggle_select_token(token) {
          var previous_selected_token = selected_token;

          if(selected_token) {
              deselect_token($(selected_token), POSITION.END);
          }

          if(previous_selected_token === token.get(0)) {
              deselect_token(token, POSITION.END);
          } else {
              select_token(token);
          }
      }
function toggle_select_token ( token ) { var previous_selected_token = selected_token ; if ( selected_token ) { deselect_token ( $ ( selected_token ) , POSITION . END ) ; } if ( previous_selected_token === token . get ( 0 ) ) { deselect_token ( token , POSITION . END ) ; } else { select_token ( token ) ; } }
Toggle selection of a token in the token list
Toggle selection of a token in the token list