Sha256: 0e9b69c9ce81de8d3d67a74704581a58a6cf8e44710973111da3c52f643b4396
Contents?: true
Size: 740 Bytes
Versions: 23
Compression:
Stored size: 740 Bytes
Contents
/*global Bloodhound */ Blacklight.onLoad(function() { 'use strict'; $('[data-autocomplete-enabled="true"]').each(function() { var $el = $(this); if($el.hasClass('tt-hint')) { return; } 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
23 entries across 23 versions & 1 rubygems