diff options
author | Scott González <scott.gonzalez@gmail.com> | 2010-07-19 09:28:04 -0400 |
---|---|---|
committer | Scott González <scott.gonzalez@gmail.com> | 2010-07-19 09:28:04 -0400 |
commit | 612838a1518c8cdc80b5bace5d925f89c1e791a3 (patch) | |
tree | 77d609f44c6f0c3296692375f5a2321fa63d82e4 /ui/jquery.ui.autocomplete.js | |
parent | 5435c50765e89f5cfb1c164dda6642c2149dc4db (diff) | |
download | jquery-ui-612838a1518c8cdc80b5bace5d925f89c1e791a3.tar.gz jquery-ui-612838a1518c8cdc80b5bace5d925f89c1e791a3.zip |
Autocomplete: Added position option. Fixes #5153 - Autocomplete position option.
Diffstat (limited to 'ui/jquery.ui.autocomplete.js')
-rw-r--r-- | ui/jquery.ui.autocomplete.js | 17 |
1 files changed, 10 insertions, 7 deletions
diff --git a/ui/jquery.ui.autocomplete.js b/ui/jquery.ui.autocomplete.js index 3fa196ecb..1391643ba 100644 --- a/ui/jquery.ui.autocomplete.js +++ b/ui/jquery.ui.autocomplete.js @@ -16,8 +16,14 @@ $.widget( "ui.autocomplete", { options: { + delay: 300, minLength: 1, - delay: 300 + position: { + my: "left top", + at: "left bottom", + collision: "none" + }, + source: null }, _create: function() { var self = this, @@ -269,12 +275,9 @@ $.widget( "ui.autocomplete", { // TODO refresh should check if the active item is still in the dom, removing the need for a manual deactivate this.menu.deactivate(); this.menu.refresh(); - this.menu.element.show().position({ - my: "left top", - at: "left bottom", - of: this.element, - collision: "none" - }); + this.menu.element.show().position( $.extend({ + of: this.element + }, this.options.position )); menuWidth = ul.width( "" ).outerWidth(); textWidth = this.element.outerWidth(); |