Skip to content
This repository has been archived by the owner on Jul 2, 2018. It is now read-only.

Allow to change options of running instance #48

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
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
12 changes: 12 additions & 0 deletions src/jquery.autocomplete.js
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down