src/jquery-tokeninput/jquery-tokeninput.js
function deselect_token (token, position) {
          token.removeClass($(input).data("settings").classes.selectedToken);
          selected_token = null;

          if(position === POSITION.BEFORE) {
              input_token.insertBefore(token);
              selected_token_index--;
          } else if(position === POSITION.AFTER) {
              input_token.insertAfter(token);
              selected_token_index++;
          } else {
              input_token.appendTo(token_list);
              selected_token_index = token_count;
          }

          // Show the input box and give it focus again
          focus_with_timeout(input_box);
      }
function deselect_token (token, position) {
          token.removeClass($(input).data("settings").classes.selectedToken);
          selected_token = null;

          if(position === POSITION.BEFORE) {
              input_token.insertBefore(token);
              selected_token_index--;
          } else if(position === POSITION.AFTER) {
              input_token.insertAfter(token);
              selected_token_index++;
          } else {
              input_token.appendTo(token_list);
              selected_token_index = token_count;
          }

          // Show the input box and give it focus again
          focus_with_timeout(input_box);
      }
function deselect_token ( token , position ) { token . removeClass ( $ ( input ) . data ( "settings" ) . classes . selectedToken ) ; selected_token = null ; if ( position === POSITION . BEFORE ) { input_token . insertBefore ( token ) ; selected_token_index -- ; } else if ( position === POSITION . AFTER ) { input_token . insertAfter ( token ) ; selected_token_index ++ ; } else { input_token . appendTo ( token_list ) ; selected_token_index = token_count ; } // Show the input box and give it focus again focus_with_timeout ( input_box ) ; }
Deselect a token in the token list
Deselect a token in the token list