Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 4 additions & 3 deletions jquery.jsonSuggest-2.js
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@
* highlightMatches : [default true] This will add strong tags around the text that matches the search text in each result.
* onSelect : [default undefined] Function that gets called once a result has been selected, gets passed in
* the object version of the result as specified in the JSON data.
*
* searchingText : [default 'Searching...'] Text displayed when getting results.
*/

(function($) {
Expand All @@ -71,7 +71,8 @@
maxHeight: 350,
highlightMatches: true,
onSelect: undefined,
width: undefined
width: undefined,
searchingText: 'Searching...'
},
getJSONTimeout;
settings = $.extend(defaults, settings);
Expand Down Expand Up @@ -229,7 +230,7 @@
}
else if (settings.url && typeof settings.url === 'string') {
var text = this.value;
$(results).html('<li class="ui-menu-item ajaxSearching"><a class="ui-corner-all">Searching...</a></li>').
$(results).html('<li class="ui-menu-item ajaxSearching"><a class="ui-corner-all">' + settings.searchingText + '</a></li>').
show().css('height', 'auto');

getJSONTimeout = window.clearTimeout(getJSONTimeout);
Expand Down