當用戶開始鍵入並顯示建議時,是否可以選擇第一個元素?jQuery TextboxList - 在結果中添加焦點(選擇)第一項
腳本我使用的:http://devthought.com/projects/jquery/textboxlist/
當用戶開始鍵入並顯示建議時,是否可以選擇第一個元素?jQuery TextboxList - 在結果中添加焦點(選擇)第一項
腳本我使用的:http://devthought.com/projects/jquery/textboxlist/
你應該能夠加入這一行:
(!options.onlyFromValues && current && current.get(0) === list.find(':first').get(0)) ? blur() : focusRelative('prev');
到showResults函數結束TextboxList.Autocomplete.js
內我推杆,它不工作,現在是這樣的代碼: results = results; \t \t(!options.onlyFromValues && current && current.get(0)=== list.find(':第一')。get(0))?blur():focusRelative('prev'); \t}; – iEternus
可能。我建議你閱讀* TextboxList *部分的解剖並嘗試一些東西。 –
我有,但我沒有找到解決方案。 :( – iEternus