Skip to content

Commit

Permalink
Merge pull request dyve#49 from doits/disable
Browse files Browse the repository at this point in the history
Allow to disable a running instance
  • Loading branch information
Dylan Verheul committed Feb 2, 2013
2 parents cd917fb + 1950945 commit ffe8af1
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion src/jquery.autocomplete.js
Original file line number Diff line number Diff line change
Expand Up @@ -77,7 +77,8 @@
delimiterChar: ',',
delimiterKeyCode: 188,
processData: null,
onError: null
onError: null,
enabled: true
};

/**
Expand Down Expand Up @@ -534,6 +535,7 @@
* Set timeout to activate autocompleter
*/
$.Autocompleter.prototype.activate = function() {
if (!this.options.enabled) return;
var self = this;
if (this.keyTimeout_) {
clearTimeout(this.keyTimeout_);
Expand Down

0 comments on commit ffe8af1

Please sign in to comment.