Display jquery ui auto-complete list on focus event

前端 未结 9 744
猫巷女王i
猫巷女王i 2020-12-01 00:26

here is my code, anything wrong with it ? it doesn\'t seem to display list on focus, i still have to press a key before it displays list



        
9条回答
  •  死守一世寂寞
    2020-12-01 01:03

    The generic purpose of AutoComplete is to execute on key press and based on the Letter we type it will perform often a wild-card search and show the result.

    Anyway, from the code above i can see that :

    focus(function(){
    $(this).trigger('keydown.autocomplete');

    which is attached as told by Codesleuth, to the anonymous function instead of the Control.

提交回复
热议问题