Sha256: 410f31d37ad9b379d06eada9353cb06aaee5faac6fc6631a03bfbfd8a3056b3a
Contents?: true
Size: 686 Bytes
Versions: 24
Compression:
Stored size: 686 Bytes
Contents
/*global Bloodhound */ Blacklight.onLoad(function() { 'use strict'; $('[data-autocomplete-enabled="true"]').each(function() { var $el = $(this); var suggestUrl = $el.data().autocompletePath; var terms = new Bloodhound({ datumTokenizer: Bloodhound.tokenizers.obj.whitespace('value'), queryTokenizer: Bloodhound.tokenizers.whitespace, remote: { url: suggestUrl + '?q=%QUERY', wildcard: '%QUERY' } }); terms.initialize(); $el.typeahead({ hint: true, highlight: true, minLength: 2 }, { name: 'terms', displayKey: 'term', source: terms.ttAdapter() }); }); });
Version data entries
24 entries across 24 versions & 1 rubygems