Is there a way to use Autocomplete without JQuery UI

前端 未结 4 1233
北海茫月
北海茫月 2021-01-14 05:37

Is there a way to use autocomplete without JQuery UI cause JQuery UI\'s footprint is too large (including its CSS) ?

or is there any alternative plugin or something

4条回答
  •  独厮守ぢ
    2021-01-14 05:57

    You can build your own that does not depend on JQuery UI, its a very simple idea of trigger field onchange(), issue an AJAX call to get result that matches what you typed so far, and populate some field with a div or drop down below or near it. And on select of the div or drop down, you populate your trigger field with selected value.

    I know that Jquery Autosuggest does not use JQuery UI but does require JQuery.

提交回复
热议问题