jQuery智能补全搜索内容插件:AutocompleteJS

jopen 10年前

Autocomplete.js 是 jQuery 插件,高度自定义,可以改进搜索功能,搜索框输入时,可以智能补全搜索内容。

To add an Animotion programmatically:

var words = ['boat', 'dog', 'drink', 'elephant', 'fruit', 'London'];    $(document).ready(function(){      $('#yourElement').autocomplete(          hints: words      );  });

Options

  • hints: words array for displaying hints.
  • placeholder: search input placeholder (default: 'Search').
  • width: input text width.
  • height: input text height.
  • showButton: display search button (default: true).
  • buttonText: button text (default: 'Search').
  • onSubmit: function handler called on input submit.
  • onBlur: function handler called on input losing focus.
  • height: input text height.

在线演示

jQuery智能补全搜索内容插件:AutocompleteJS

项目主页:http://www.open-open.com/lib/view/home/1411913137812