1
我想讓我的jQuery UI Autocomplete以我想要的方式工作,但我不太確定該怎麼做。首先,我無法獲得加載以在輸入字段中工作。我也希望jQuery因此,例如,如果源是jQuery UI自動完成
蘋果 可樂 茶 胡蘿蔔
所以當您鍵入任何字匹配與「A」第一,如果符合按首字母搜索結果您正在搜索的說「可樂」,你在結果部分,所以你提前鍵入「合作」,它將在這裏強調是我當前的代碼
$("#ui_query").autocomplete({ autoFocus: true });
$("#ui_query").autocomplete({ disabled: false });
$("#ui_query").autocomplete({ minLength: 2 });
$(".ui-autocomplete-loading").ajaxStart(function(){
$(this).show();
});
$(".ui-autocomplete-loading").ajaxStop(function(){
$(this).hide();
});
$(document).ready(function() {
$("#ui_query").autocomplete({
source: [
"Bleach",
"Naruto",
"Level E",
"Kore wa Zombie desu ka",
"Onii-chan no Koto Nanka Zenzen Suki Janain Dakara ne!!",
"Mobile Suit Gundam SEED Destiny",
"Mobile Suit Gundam SEED",
"One Piece",
"Freezing",
"To Aru Majutsu No Index 2",
"IS: Infinite Stratos",
"Gosick",
"Mahou Shoujo Madoka Magica",
"Yumekui Merry",
"Hyakka Ryouran: Samurai Girls",
"After War Gundam X",
"Mobile Suit Gundam",
"Mobile Suit Gundam 00",
"Fullmetal Alchemist: Brotherhood",
"Fullmetal Alchemist",
"Tengen Toppa Gurren Lagann",
"Code Geass: Hangyaku no Lelouch",
"11eyes",
"Code Geass: Hangyaku no Lelouch R2",
]
});
});
感謝鍵入的jQuery將突出每個字母
看到這個問題/答案:http://stackoverflow.com/questions/2435964 – Cheeso 2011-04-26 14:32:18