开发者

Use of $.data(li, "ac_data", data[i]) from function fillList() of jquery-autocomplete

开发者 https://www.devze.com 2022-12-12 05:57 出处:网络
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:

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();
    },
0

精彩评论

暂无评论...
验证码 换一张
取 消