javascript - How to make the autocomplete search result contains hyperlinks -
hi doing search box search items in list. when users start type in words, original list fade out, while list of matched items fade in, , items in list contain hyperlinks.
this right now, http://jsfiddle.net/x69chen/sbar6/5/.
i using fadein, fadeout change list, , autocomplete feature. this
$(".form-search").keypress(function() { $("#nav-list123").fadeout({}); $("#search-result").fadein({}); $("#autocomplete").autocomplete({}});
however, not make hyperlinks search result, seems need customize autocomplete code. have no idea how it.
could helps me please?
thanks.
you can manually open link that:
$("#autocomplete").autocomplete({ source: source, select: function( event, ui ) { window.location.href = ui.item.value; //window.open(ui.item.value); // if want open in new tab } });
Comments
Post a Comment