项目中用到了jquery的autocomplete,我下载的jquery的api chm有三个版本,两个索引不到autocomplete,一个能,但没有对scrollHeight的描述,这个事情让我意识到api chm帮了我的倒忙了,于是到jquery的官网去弄api文档,实在是找不到api文档的下载的链接. 是不是query官方不提供api文档的下载?
ps:我本来想把这个帖子发到jquery专栏的,我没有找到这个专栏,如果有的话,请提醒我.谢谢.

解决方案 »

  1.   

    补充说明:
    三个api chm分别是:
    1.4,
    1.6,
    1.7,
    其中只有1.6索引到了autocomplete.
      

  2.   

    ml5271169588,你回复的好快!
    你在你的1.4里面索引一下autocomplete,如果没有索引到的话,我就不要这个版本了.
      

  3.   

    我之前下载的1.7是CN的,
    听你的,重下了个EN的,这回能索引到autocomplete了,
    不过,仍然没有对scrollHeight的描述
    ...
      

  4.   

    autocomplete??
    jquery ui库吧?
    http://api.jqueryui.com/autocomplete/  jq ui的api
    话说 你哪里看到有scrollHeight这个方法的?
      

  5.   

    bassistance.de的JQuery Autocomplete plugin比较强大,直接到官网上看资料就好,没看过下载下来的,都是直接去官网看。
      

  6.   

    to : beiouwolf
    http://api.jqueryui.com/autocomplete/
    我试过了,打不开,
    scrollHeight是属性,不是方法,
    我截取项目的部分代码如下:
    //CODE-BEGIN
    $("#"+theShow).autocomplete(dictionaryString, {
        minChars: 0, //自动完成激活之前填入的最小字符 
        width: width, //提示的宽度,溢出隐藏 
        max:50,//控制展示的数目
        scrollHeight: 155, //提示的高度,溢出显示滚动条 
        matchContains: true, //包含匹配,就是data参数里的数据,是否只要包含文本框里的数据就显示 
        autoFill: false, //自动填充 
        mustMatch:true,//如果输入值不在选择的值列表中则清空
    //CODE-END
      

  7.   

    怀疑你不是jquery ui的autocomplate...
    官网参数列表和你完全不一样appendToType: Selector Default: "body" Which element the menu should be appended to. Override this when the autocomplete is inside a position: fixed element. Otherwise the popup menu would still scroll with the page.
     autoFocusType: Boolean Default: false If set to true the first item will automatically be focused when the menu is shown.
     delayType: Integer Default: 300 The delay in milliseconds between when a keystroke occurs and when a search is performed. A zero-delay makes sense for local data (more responsive), but can produce a lot of load for remote data, while being less responsive.
     disabledType: Boolean Default: false Disables the autocomplete if set to true.
     minLengthType: Integer Default: 1 The minimum number of characters a user must type before a search is performed. Zero is useful for local data with just a few items, but a higher value should be used when a single character search could match a few thousand items.
     positionType: Object Default: { my: "left top", at: "left bottom", collision: "none" } Identifies the position of the suggestions menu in relation to the associated input element. The of option defaults to the input element, but you can specify another element to position against. You can refer to the jQuery UI Position utility for more details about the various options.
     sourceType: Array or String or Function( Object request, Function response( Object data ) )
     
    Default: none; must be specified Defines the data to use, must be specified. 
    Independent of the variant you use, the label is always treated as text. If you want the label to be treated as html you can use Scott González' html extension. The demos all focus on different variations of the source option - look for one that matches your use case, and check out the code.
     Multiple types supported: • Array: An array can be used for local data. There are two supported formats: ◦An array of strings: [ "Choice1", "Choice2" ]
     ◦An array of objects with label and value properties: [ { label: "Choice1", value: "value1" }, ... ]
     The label property is displayed in the suggestion menu. The value will be inserted into the input element when a user selects an item. If just one property is specified, it will be used for both, e.g., if you provide only value properties, the value will also be used as the label. 
    • String: When a string is used, the Autocomplete plugin expects that string to point to a URL resource that will return JSON data. It can be on the same host or on a different one (must provide JSONP). The Autocomplete plugin does not filter the results, instead the request parameter term gets added to the URL, which the server-side script should use for filtering the results. The data itself can be in the same format as the local data described above.
     • Function: The third variation, a callback, provides the most flexibility and can be used to connect any data source to Autocomplete. The callback gets two arguments: ◦A request object, with a single term property, which refers to the value currently in the text input. For example, if the user enters "new yo" in a city field, the Autocomplete term will equal "new yo".
    ◦A response callback, which expects a single argument: the data to suggest to the user. This data should be filtered based on the provided term, and can be in any of the formats described above for simple local data. It's important when providing a custom source callback to handle errors during the request. You must always call the response callback even if you encounter an error. This ensures that the widget always has the correct state.
      

  8.   

    beiouwolf,谢谢你的回复,
    项目赶时间,不方便确认使用到的jquery是否是从官网下载的
    等我确认了,再回复大家
      

  9.   

    可以确定的是项目中用到的jQuery的版本是1.4

    这个事情现在仍然没有弄清白
    谢谢大家