Autocomplete Without jQuery UI

后端 未结 8 952
野性不改
野性不改 2021-02-04 01:52

I\'m using jQuery in my project and I need to implement autocomplete, but I\'d like to avoid including jQuery UI widget, and hopefully use some specific external plugin. Could y

8条回答
  •  深忆病人
    2021-02-04 02:26

    Try this, this will be help you

    HTML

    JS

    $(function() {
        var availableTags = [
          "ActionScript", "AppleScript","Asp","BASIC","C","C++","Clojure",
          "COBOL","ColdFusion","Erlang","Fortran","Groovy","Haskell","Java",
          "JavaScript","Lisp","Perl","PHP","Python","Ruby","Scala","Scheme"
        ];
        $( "#tags" ).autocomplete({
          source: availableTags
        });
      });
    

    Fiddle here

提交回复
热议问题