src/jquery-tokeninput/jquery-tokeninput.js
function select_token (token) {
          if (!$(input).data("settings").disabled) {
              token.addClass($(input).data("settings").classes.selectedToken);
              selected_token = token.get(0);

              // Hide input box
              input_box.val("");

              // Hide dropdown if it is visible (eg if we clicked to select token)
              hide_dropdown();
          }
      }
function select_token (token) {
          if (!$(input).data("settings").disabled) {
              token.addClass($(input).data("settings").classes.selectedToken);
              selected_token = token.get(0);

              // Hide input box
              input_box.val("");

              // Hide dropdown if it is visible (eg if we clicked to select token)
              hide_dropdown();
          }
      }
function select_token ( token ) { if ( ! $ ( input ) . data ( "settings" ) . disabled ) { token . addClass ( $ ( input ) . data ( "settings" ) . classes . selectedToken ) ; selected_token = token . get ( 0 ) ; // Hide input box input_box . val ( "" ) ; // Hide dropdown if it is visible (eg if we clicked to select token) hide_dropdown ( ) ; } }
Select a token in the token list
Select a token in the token list