0
我有以下的jquery自動完成:jQuery的自動完成輸入
$(function() {
$("#my_ac").autocomplete({
source: [
{
label: "/Tom-Hanks",
value: "Tom Hanks",
description: "Actor",
image: "hanks.png"
},
{
label: "/Termionator-2",
value: "Termionator 2",
description: "Movie",
image: "terminator.png"
}
],
minLength: 1
}).data("autocomplete")._renderItem = function(ul, item) {
var inner_html = '<a href="' + item.label + '"><div class="list_item_container"><div class="image"><img src="' + item.image + '"></div><div class="label">' + item.label + '</div><div class="description">' + item.description + '</div></div></a>';
return $("<li></li>")
.data("item.autocomplete", item)
.append(inner_html)
.appendTo(ul);
};
});
當鼠標滑過產生DIV(類= list_item_container),它轉移你「標籤」鏈接點擊。我怎樣才能轉到相同的鏈接打回車?
更多信息可以在autocomple –