Skip to content

Commit

Permalink
Fixed issue where autofill box was not closing correctly.
Browse files Browse the repository at this point in the history
  • Loading branch information
benergize committed Sep 20, 2018
1 parent 40a23bc commit a814f0f
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion bautofill.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@

$( document ).ready(function() {


Expand Down Expand Up @@ -75,6 +74,7 @@ $( document ).ready(function() {

for(var v = 0; v < document.getElementsByClassName("bautoCompleteList").length; v++) {
document.getElementsByClassName("bautoCompleteList")[v].innerHTML = "";
document.getElementsByClassName("bautoCompleteList")[v].style['visibility'] = "hidden";
}
}

Expand Down
4 changes: 2 additions & 2 deletions example.html
Original file line number Diff line number Diff line change
Expand Up @@ -14,11 +14,11 @@

Data in HTML: <input type = 'text' class = 'bautoCompleteInput' data-filler='["Apples","Oranges","Eggplant","Bananas"]'>

<br/>
<br/> <br/>

Data from JS: <input type = 'text' class = 'bautoCompleteInput' id = 'dataInVariable' data-filler=''>

<script>document.getElementById('dataInVariable').dataset['filler'] = '["New York","Wisconsin","Nevada","Arizona","Mississippi"]';</script>
<script>document.getElementById('dataInVariable').dataset['filler'] = '["New York","Michigan","Miami","Arizona","Mississippi"]';</script>

<p>Above are two examples of bautofill text boxes. The data from the text boxes is populated from JSON arrays of strings. In the case of the top example, this is provided directly in the HTML. The bottom is provided via JavaScript. You can of course populate these lists using AJAX! </p>
</body>
Expand Down

0 comments on commit a814f0f

Please sign in to comment.