Skip to content
A lightweight completion plugin for jQuery
Branch: master
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
README.md
example.html Added type and name attributes in input Jul 8, 2016
jquery.select-autocomplete.css
jquery.select-autocomplete.js Removed dropdown absolute position and fixed cancel button. Jul 7, 2016
jquery.select-autocomplete.min.css
jquery.select-autocomplete.min.js

README.md

jQuery-selectAutocomplete

A lightweight completion suggester plugin for jQuery.

Compatible with jQuery 1.8.0+. No dependencies except the jQuery library. Released under the MIT License: http://www.opensource.org/licenses/mit-license.php

Example

https://art-mironoff.github.io/jquery-select-autocomplete/example.html

Usage

var data = [
  { id: "1", name: "ActionScript" },
  { id: "2", name: "AppleScript" },
  { id: "3", name: "Asp" }
];

$("#autocomplete").selectAutocomplete({
  data: data
});
<input id="autocomplete" type="text" name="search" />

Props

Key Default Type
cancelButtonText "Remove" String
data [ ] Array
dropdownAttrs { class: "dropdown" } Object
minLength 3 Integer
onSelect function { } Function
onCancel function { } Function
showCancelButton true Boolean
wrapperAttrs { class: "select-autocomplete" } Object

To specify settings after the init, use this syntax:

$("#autocomplete").selectAutocomplete({
  cancelButtonText: "Remove",
  data: [],
  dropdownAttrs: {
    class: "dropdown"
  }
});
You can’t perform that action at this time.