diff --git a/src/jquery.autocomplete.js b/src/jquery.autocomplete.js index a0e56c7..b00237d 100644 --- a/src/jquery.autocomplete.js +++ b/src/jquery.autocomplete.js @@ -601,6 +601,18 @@ } }; + /** + * Change options of an instance + * @param {object} opts Object with the new options, e.g. {url: "/new/url/"} + * @public + */ + $.Autocompleter.prototype.setOptions = function(opts) { + var key; + for (key in opts) { + this.options[key] = opts[key]; + } + }; + /** * Build the url for a remote request * If options.queryParamName === false, append query to url instead of using a GET parameter