开发者

jquery autocomplete array help

开发者_开发技巧

Hey all i am trying to use my already array that i populated into the jQuery Source:

$(document).ready(function(){
    $("input#partSearchBox").autocomplete({
        source: [partNum]
    });
});

the partNum looks like this:

gh3423645,jh324332,iu45233,gk324456, etc etc...

And i can get to each data by doing this:

partNum[0] or partNum[3], etc...

How can i already use that array within the source? The code i posted above has no suggestions once i start typing?

Thanks!

David


Since partNum is already an array, try using

source: partNum

instead of source: [partNum].

0

上一篇:

下一篇:

精彩评论

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

最新问答

问答排行榜