Sha256: 0fa17cf2c00c2352cc1daacaac3cd47de8e83548f4c6b90b3bd99928d4ad0ded

Contents?: true

Size: 631 Bytes

Versions: 7

Compression:

Stored size: 631 Bytes

Contents

<div id="suggestion-search">
  <input class="typeahead" type="text" placeholder="{{ include.placeholder }}">
</div>

<script type="text/javascript">
  document.addEventListener("DOMContentLoaded", function(e) {
    var items = JSON.parse(localStorage.getItem('items'));

    var data = new Bloodhound({
      datumTokenizer: Bloodhound.tokenizers.whitespace,
      queryTokenizer: Bloodhound.tokenizers.whitespace,
      local: items
    });

    $('#suggestion-search .typeahead').typeahead({
      hint: true,
      highlight: true,
      minLength: 1
    },
    {
      name: 'data',
      source: data,
    });
  });
</script>

Version data entries

7 entries across 7 versions & 1 rubygems

Version Path
dta_rapid-1.2.4 _includes/lists/suggestion-search.html
dta_rapid-1.2.3 _includes/lists/suggestion-search.html
dta_rapid-1.2.2 _includes/lists/suggestion-search.html
dta_rapid-1.2.1 _includes/lists/suggestion-search.html
dta_rapid-1.1.2 _includes/lists/suggestion-search.html
dta_rapid-1.1.1 _includes/lists/suggestion-search.html
dta_rapid-1.2.0 _includes/lists/suggestion-search.html