/* * Autocomplete - jQuery plugin 1.0 Alpha * * Copyright (c) 2007 Dylan Verheul, Dan G. Switzer, Anjesh Tuladhar, Jörn Zaefferer * * Dual licensed under the MIT and GPL licenses: * http://www.opensource.org/licenses/mit-license.php * http://www.gnu.org/licenses/gpl.html * * Revision: $Id: jquery.autocomplete.js 1729 2007-04-17 20:04:10Z joern $ * */ /* TODO - add a callback to allow decoding the response - fix mustMatch - add scrollbars and page down/up, option for height or number of items to be visible without scrolling - allow modification of not-last value in multiple-fields @option TODO Number size Limit the number of items to show at once. Default: */ /** * Provide autocomplete for text-inputs or textareas. * * Depends on dimensions plugin's offset method for correct positioning of the select box and bgiframe plugin * to fix IE's problem with selects. * * @example $("#input_box").autocomplete("my_autocomplete_backend.php"); * @before * @desc Autocomplete a text-input with remote data. For small to giant datasets. * * When the user starts typing, a request is send to the specified backend ("my_autocomplete_backend.php"), * with a GET parameter named q that contains the current value of the input box and a paremeter "limit" with * the value specified for the max option. * * A value of "foo" would result in this request url: my_autocomplete_backend.php?q=foo&limit=10 * * The result must return with one value on each line. The result is presented in the order * the backend sends it. * * @example $("#input_box").autocomplete(["Cologne", "Berlin", "Munich"]); * @before * @desc Autcomplete a text-input with local data. For small datasets. * * @example $.getJSON("my_backend.php", function(data) { * $("#input_box").autocomplete(data); * }); * @before * @desc Autcomplete a text-input with data received via AJAX. For small to medium sized datasets. * * @example $("#mytextarea").autocomplete(["Cologne", "Berlin", "Munich"], { * multiple: true * }); * @before