我正在使用这个漂亮的脚本http://qpoit.com/marcofolio_demo/apple_search/但是我想在$.("#result").html(selectedValue);
的div中显示所选的值,但我不知道在搜索结果出现后如何获取所选的值。请帮忙
答案 0 :(得分:1)
如果要显示<span>
标记中显示的搜索结果的文字:
// Place inside the keyup method used for triggering AJAX call
$('#searchresults a').mouseenter(function() {
$('#result').text($(this).children('.searchheading').text());
}).mouseleave(function() {
$('#result').text('');
});