var data = {
"ale": [
"<a href='http://www.baidu.com'>百度</a>",
]
};搜索之后点击显示在input中的时候不让它a连接的地址一块显示在input中
用的有点别扭小小的改进了下。
功能描述:点击搜索框以外的区域,隐藏下拉列表
$(document).bind("click", function(e) {
if (!$(e.target).hasClass('js-typeahead-countries')) {
if ($(e.target).closest(".typeahead__list").length != 0) return;
$('.typeahead__list').hide();
}
})