且构网

分享程序员开发的那些事...
且构网 - 分享程序员编程开发的那些事

什么是jQuery的自动完成插件中的catcomplete?

更新时间:2022-03-27 08:18:17


什么是catcomplete?

What is catcomplete?

catcomplete 是一个出现在jQuery对象上的属性。它不是核心jQuery的一部分,因此可能在页面上添加了一些其他脚本。

catcomplete is a property that appears on jQuery objects. It is not part of core jQuery so there is presumably some other script on the page that is adding it.


jQuery的自动完成如何调用它?

How does jQuery's autocomplete call it?

我找不到自动填充文档中任何地方提到的 catcomplete ,所以它可能没有。它只修改了页面中元素的CSS,其中的类名表明它们通常受自动完成的影响。

I can't find catcomplete mentioned anywhere in the documentation for autocomplete, so it probably doesn't. It just modifies the CSS of elements in the page with class names that suggest they are normally influenced by autocomplete.


什么是minLength,source,打开并选择?

What are minLength, source, open and select?

作为参数传递给 catcomplete 的对象的属性完成功能。您应该阅读catcomplete文档以了解它们的含义。

Properties of the object that gets passed as an argument to the catcomplete complete function. You should read the catcomplete documentation to find out what they mean.


谁决定了他们的名字?

Who decided their name?

catcomplete的作者

The author(s) of catcomplete


代码的哪一部分知道如何使用它们?

Which part of the code knows how to use them?

catcomplete脚本

The catcomplete script


他们是标准jQuery的一部分?

Are they a part of standard jQuery?

否。


catcomplete是函数吗?

Is catcomplete a function?

是的,它有(...)之后调用它并且(可能)不会抛出异常。

Yes, it has (…) after it to call it and does not (presumably) throw an exception.


什么是 $(# searchTextBox)。示例({})?在做什么?我是否定义了一个数组并将其传递给名为Example的函数?

What is $("#searchTextBox").Example({})? doing? Am I defining an array and passing it to a function called Example?

否。您正在创建一个对象。数组将是 []

No. You are creating an object. An array would be [].


或者我是否定义了一个名为Example的函数来初始化一个匿名数组?

Or am I defining a function called Example which initializes an anonymous Array?

没有。那将是:

function Example() {
    var foo = [];
}