Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
24 changes: 24 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -81,6 +81,30 @@ Or the following, if you don’t want to use a `<datalist>`, or if you don’t w

There are multiple customizations and properties able to be instantiated within the JS. Libraries and definitions of the properties are available in the Links below.

## Events

For use events, just add event listener like this :

In regular Javascript

```javascript
var input = document.getElementById("inputlist");
new Awesomplete(input, {list: yourlist});
document.getElementById('inputlist').addEventListener('awesomplete-selectcomplete',function(){
alert(this.value);
});
```

In Jquery

```javascript
var input=$("#inputlist")[0];
new Awesomplete(input, {list: yourlist});
$("#inputlist").on('awesomplete-selectcomplete',function(){
alert(this.value);
});
```

## License

Awesomplete is released under the MIT License. See [LICENSE][1] file for
Expand Down