I'm using the jquery-autocomplete plugin of Jörn Zaefferer and I can't understand the use of this line in the fil开发者_如何学GolList() function:
$.data(li, "ac_data", data[i]);
Please help me. Thanks.
jQuery.data
each tag "li" which creates, assigns the data in "ac_data" with the value in data[i];
variable declaration data:
var listItems,
active = -1,
data,
term = "",
needsInit = true,
element,
list;
assigning value to variable data:
display: function(d, q) {
init();
data = d;
term = q;
fillList();
},
精彩评论