https://github.com/gggordon/anyautocomplete
A plugin created for search suggestions that is more flexible
https://github.com/gggordon/anyautocomplete
Last synced: about 1 month ago
JSON representation
A plugin created for search suggestions that is more flexible
- Host: GitHub
- URL: https://github.com/gggordon/anyautocomplete
- Owner: gggordon
- License: mit
- Created: 2015-04-28T07:13:00.000Z (about 10 years ago)
- Default Branch: master
- Last Pushed: 2018-06-24T04:18:22.000Z (almost 7 years ago)
- Last Synced: 2025-04-28T18:57:14.352Z (about 1 month ago)
- Language: JavaScript
- Homepage: http://gggordon.github.io/AnyAutoComplete
- Size: 86.9 KB
- Stars: 2
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
AnyAutoComplete
---------------> A plugin created for search suggestions that is more flexible.
Why?
----> Most search suggestion plugins were very strict, didn't allow users to
> still write naturally while using suggestions, only allowing search
> suggestions to be at the end of input text, AnyAutoComplete solves
> this!Dependencies
------------- -jQuery 2.*
Getting Started
---------------Use npm
npm install --save anyautocomplete
Use bower
bower install --save AnyAutoComplete
or Download minified script from GitHub
https://github.com/gggordon/AnyAutoComplete/blob/master/AnyAutoComplete.min.js
Then Include in html file
This plugin integrates well with bootstrap. Without bootstrap, you may include the default stylesheet
Usage
-----
With jQuery$('.suggestion-boxes').anyAutoComplete(options);
or standalone
new AnyAutoComplete(divNode, options);
where
divNode - HTMLInputElement - textbox node
options - Object
=================
options : {
dataSource : { //keywords or suggestions
'Cat 1 Name':[
'Elem 1',
'Elem 2'
],
'Cat 2 Name':[
'Elem 1',
'Elem 2'
]
}
}Enjoy
-----
Enjoy this project and if you have any issues feel free to state them here on github or contribute.