Skip to content

Commit

Permalink
Version 3.1.0 => Release History for details
Browse files Browse the repository at this point in the history
  • Loading branch information
TarekRaafat committed Jan 6, 2019
1 parent 461950b commit bd4b978
Show file tree
Hide file tree
Showing 14 changed files with 55 additions and 31 deletions.
6 changes: 3 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@
<br>
<br>

> Simple autocomplete pure vanilla Javascript library. <a href="https://tarekraafat.github.io/autoComplete.js/demo/" target="\_blank">:rocket: Live Demo</a> **v3.0**
> Simple autocomplete pure vanilla Javascript library. <a href="https://tarekraafat.github.io/autoComplete.js/demo/" target="\_blank">:rocket: Live Demo</a> **v3.1**
autoComplete.js is a simple pure vanilla Javascript library that's progressively designed for speed, high versatility and seamless integration with wide range of projects & systems, made for users and developers in mind.

Expand Down Expand Up @@ -52,13 +52,13 @@ git clone https://github.com/TarekRaafat/autoComplete.js.git
`CSS`

```html
<link rel="stylesheet" href="https://cdn.jsdelivr.net/gh/TarekRaafat/autoComplete.js@3.0.0/dist/css/autoComplete.min.css">
<link rel="stylesheet" href="https://cdn.jsdelivr.net/gh/TarekRaafat/autoComplete.js@3.1.0/dist/css/autoComplete.min.css">
```

`JS`

```html
<script src="https://cdn.jsdelivr.net/gh/TarekRaafat/autoComplete.js@3.0.0/dist/js/autoComplete.min.js"></script>
<script src="https://cdn.jsdelivr.net/gh/TarekRaafat/autoComplete.js@3.1.0/dist/js/autoComplete.min.js"></script>
```

- <a href="https://www.npmjs.com/package/@tarekraafat/autocomplete.js">npm</a> install `(Node Package Manager)`
Expand Down
8 changes: 6 additions & 2 deletions dist/js/autoComplete.js
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,9 @@
var createResultsList = function createResultsList(renderResults) {
resultsList = document.createElement("ul");
resultsList.setAttribute("id", select.resultsList);
if (renderResults.container) {
renderResults.container(resultsList);
}
renderResults.destination.insertAdjacentElement(renderResults.position, resultsList);
};
var highlight = function highlight(value) {
Expand Down Expand Up @@ -128,8 +131,9 @@
this.searchEngine = config.searchEngine === "loose" ? "loose" : "strict";
this.threshold = config.threshold || 0;
this.resultsList = autoCompleteView.createResultsList({
destination: config.resultsList ? config.resultsList.destination : autoCompleteView.getInput(this.selector),
position: config.resultsList ? config.resultsList.position : "afterend"
container: config.resultsList.container,
destination: config.resultsList.destination ? config.resultsList.destination : autoCompleteView.getInput(this.selector),
position: config.resultsList.position ? config.resultsList.position : "afterend"
});
this.placeHolder = config.placeHolder;
this.maxResults = config.maxResults || 5;
Expand Down
Binary file modified dist/js/autoComplete.js.gz
Binary file not shown.
2 changes: 1 addition & 1 deletion dist/js/autoComplete.min.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Binary file modified dist/js/autoComplete.min.js.gz
Binary file not shown.
3 changes: 3 additions & 0 deletions dist/js/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,9 @@ const autoCompletejs = new autoComplete({
highlight: true,
maxResults: Infinity,
resultsList: {
container: source => {
source.classList.add("foodList");
},
destination: document.querySelector("#autoComplete"),
position: "afterend"
},
Expand Down
Loading

0 comments on commit bd4b978

Please sign in to comment.