只是
http://docs.jquery.com/Plugins/autocomplete http://docs.jquery.com/Plugins/autocomplete
具有一些 CSS 功能。您可以使用Chrome > Inspector
看看他们添加了什么样的样式来创建这样的 UI l&f
Edit
基本上它是 jquery 中的悬停绑定
$("li").hover(fn);
在这个例子(wowhead.com)中,他们调用了一个链接,该链接是自动完成 div 的一部分
<div class="live-search-icon" style="background-image:
url(http://static.wowhead.com/images/wow/icons/small/inv_misc_head_dragon_black.jpg); ">
<div>
<a href="/item=19003" class=" q4">
<i>Item</i>
<span>Head of Nefarian</span>
</a>
</div>
</div>
jquery 做了一个.ajax()
像这样调用 url:/item=19003&power
返回的数据是json格式的
$WowheadPower.registerItem('18422', 0, {
name_enus: 'Head of Onyxia',
quality: 4,
icon: 'INV_Misc_Head_Dragon_01',
tooltip_enus: '<table><tr><td><b class="q4">Head of Onyxia</b><br /><!--bo-->Binds when picked up<br />Unique<br /><a href="/quest=7490" class="q1">This Item Begins a Quest</a><br />Requires Level 60<br />Item Level 60</td></tr></table><table><tr><td><span class="q">"The head of the Black Dragonflight\'s Brood Mother"</span></td></tr></table>'
});
它们显示在 div 中,相对于鼠标指针位置定位
我没有提取确切的代码,但有可能,他们.js
文件仅被压缩,不被混淆