|
@@ -34,13 +34,13 @@
|
|
|
var searchSuggestions = $("#search-suggestions");
|
|
|
var searchSuggestionsList = searchSuggestions.find("ul");
|
|
|
|
|
|
// Show the search suggestions only if the user has provided 2 or more
|
|
|
// characters.
|
|
|
if (searchField.val().length >= 2) {
|
|
|
request = $.getJSON(conntrackt_api_url + "/search/" + searchField.val())
|
|
|
request = $.getJSON(conntrackt_api_url + "/search/" + searchField.val(), {"limit": 4})
|
|
|
.done(function(data) {
|
|
|
|
|
|
// Process the retrieved JSON response, setting-up list of
|
|
|
// items that will be offered as suggestion.
|
|
|
var items = [];
|
|
|
$.each(data, function(index, item) {
|