0

So I have a textfield with an autocomplete attached to it working fine.

Here's what I want to happen:

  1. The user types some letters into the textfield
  2. The user is presented with the autocomplete suggestions list
  3. The user selects an item from the suggestion list
  4. The textfield is populated with the chosen item
  5. The user is immediately presented with another suggestion list composed from a specified array

Basically, after the user makes their selection I want to present them with boolean operators - "AND"/"OR". The textfield is for a search application. I want to facilitate users searching for multiple topics e.g. "Apples AND Bananas".

Thanks

4

1 に答える 1

1

オートコンプリートの選択イベントを使用する

$( ".selector" ).on( "autocompleteselect", function( event, ui ) {
    // Write your code here
    // preferably update your source of tags. Like,
    // availableTags = [New tag1, New tag2, ...];
} );
于 2013-02-12T12:09:30.013 に答える