Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
我正在使用 Jörn Zaefferer 的 jquery-autocomplete 插件,但我无法理解该行在 fillList() 函数中的用法:
$.data(li, "ac_data", data[i]);
请帮我。谢谢。
jQuery.data
创建的每个标签“li”将“ac_data”中的数据分配给data[i]中的值;
变量声明数据:
var listItems, active = -1, data, term = "", needsInit = true, element, list;
为变量数据赋值:
display: function(d, q) { init(); data = d; term = q; fillList(); },