https://github.com/anseki/jquery-ui-autocomplete-scroll
Scrollable jQuery UI Autocomplete for long item list
https://github.com/anseki/jquery-ui-autocomplete-scroll
Last synced: over 1 year ago
JSON representation
Scrollable jQuery UI Autocomplete for long item list
- Host: GitHub
- URL: https://github.com/anseki/jquery-ui-autocomplete-scroll
- Owner: anseki
- License: mit
- Created: 2013-10-18T19:03:33.000Z (almost 13 years ago)
- Default Branch: master
- Last Pushed: 2022-01-20T11:15:35.000Z (over 4 years ago)
- Last Synced: 2024-05-29T10:10:45.195Z (about 2 years ago)
- Language: JavaScript
- Homepage: http://anseki.github.io/jquery-ui-autocomplete-scroll/
- Size: 43.9 KB
- Stars: 21
- Watchers: 5
- Forks: 10
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# Scrollable jQuery UI Autocomplete
Scrollable jQuery UI Autocomplete Plugin for long items list.
CSS `max-height`, `overflow-y` and `padding-right` can make scrollable list easy. But that is not beautiful. This plugin calculate with items and height of it.
**See DEMO**
## Usage
- Load the `jquery.ui.autocomplete.scroll.min.js` script file after loading `jquery.ui.autocomplete.js` etc.
- The `maxShowItems` is added to Autocomplete options. It accept the number of items which is max height of items list.
## Example
```js
$('#txt1').autocomplete({
maxShowItems: 5, // Make list height fit to 5 items when items are over 5.
source: list1
});
```