jSuggest

授权协议 未知
开发语言 JavaScript
所属分类 jQuery 插件、 jQuery表单及相关
软件类型 开源软件
地区 不详
投 递 者 相威
操作系统 跨平台
开源组织
适用人群 未知
 软件概览

jSuggest is yet another auto-completer for your text input box. It mimics the functionality of Google suggest. jSuggest will also bind item selection to your up and down arrows and also allow you to select the suggestions using your mouse.

Download
Demo

The API and Default Values

 

$.fn.jSuggest.defaults = {
minchar: 3,
opacity: 1.0,
zindex: 20000,
delay: 2500,
loadingImg: 'ajax-loader.gif',
loadingText: 'Loading...',
autoChange: false,
url: "",
type: "GET",
data: ""
};

 

Explanation of the Options:

minchar: the minimum number of characters in the textfield before jSuggest fires
opacity: opacity of the suggestions
zindex: z-index of the suggestions
delay: number of miliseconds before jSuggest fires
loadingImg: the image when waiting for ajax calls
loadingText: the text when waiting for ajax calls
autoChange: IF TRUE, automatically change the text of the text box on hover or selected. IF FALSE: change the text of the textbox when enter or mouse click on the suggestion
url: address of your suggestions.
type: "GET" or "POST"
data: this can be the name of the text box ie [ if data="age" and url ="pro.php", then this is parsed pro.php?age=textBoxvalue ]. Do not touch this option if you have no idea. Best to leave empty.

  • /** * * Description : JSuggest 下拉提示框 */ function JSuggest(){ // DIV下拉框 this.div = null; // DIV下的ul this.ul = null; // 文本输入框 this.input = null; // 当前DIV所选的LI对象 this.current_li = null; /** * 隐藏下拉提示框 */

  • 1.下载jquery-latest.js,JSuggest.js和JSuggest.css JSuggest.js源代码如下 /** * * Description : JSuggest 下拉提示框 */ function JSuggest(){ // DIV下拉框 this.div = null; // DIV下的ul this.ul = null; // 文本输入框 this.input =