Update README.md

This commit is contained in:
caharkness 2025-02-27 14:35:18 -07:00
parent 8eebb13b6b
commit 5711e32be3

View File

@ -2,15 +2,7 @@
A JavaScript and CSS library for augmenting raw HTML inputs with modern search features
###### Requirements
* jQuery
###### Features
* Support for locally rendered options and options returned via a GET request
###### Basic Usage
### Basic Usage
Include both the `SearchableInput.js` and `SearchableInput.css` files in your page's source and wrap any text input like the following:
@ -25,7 +17,7 @@ Include both the `SearchableInput.js` and `SearchableInput.css` files in your pa
</div>
</div>
###### Shared Item Source
### Shared Item Source
If multiple inputs require the same source of data, put your `div.item` options in a hidden div somewhere in the document accessible by its `id` attribute:
@ -42,7 +34,7 @@ Then, in the `div.items` container beneath the input, set its `data-source` attr
<div class="items" data-source="#items-source"></div>
</div>
###### Items from GET (application/json)
### Items from GET Request
Alternatively, you can set the `data-source-api` to access a GET endpoint that responds with `application/json`: