0

I am looking to add autocomplete to my jQuery plugin input field and support jQuery 1.7+, something lightweight preferably.

Looking at bootstrap 3 js requires jQuery 1.9+, so I scrapped that off the list for now. jQuery UI autocomplete is an option but necessarily want users who would want to use my plugin to include jQuery ui file as well as its quite big.

I am looking at the following options and want to make sure they will work for the following scenario. my plugin will add a text input field to the div where my plugin is attached, this text input field will then have autocomplete feature pulling data from a restful web service.

Any suggestions ?

marc_s
  • 732,580
  • 175
  • 1,330
  • 1,459
StevieB
  • 6,263
  • 38
  • 108
  • 193

1 Answers1

0

<input class="select2-search__field" type="search" tabindex="0" autocomplete="off" autocorrect="off" autocapitalize="off" spellcheck="false" role="textbox" placeholder="Select a state" style="width: 358px;">

Select2 documentation link under placeholder section on the 2nd field its show a input field with type="search". So it makes very clear that you can use it for autocomplete but dont forget to add the script select2.min.js