2
0
mirror of https://github.com/devbridge/jQuery-Autocomplete.git synced 2024-11-29 08:14:06 +00:00

custom pinTo element

This commit is contained in:
dima 2014-02-12 14:06:00 +04:00
parent 702bc0e9c3
commit cb69351deb

View File

@ -59,6 +59,7 @@
lookup: null, lookup: null,
onSelect: null, onSelect: null,
width: 'auto', width: 'auto',
pinTo: el,
minChars: 1, minChars: 1,
maxHeight: 300, maxHeight: 300,
deferRequestBy: 0, deferRequestBy: 0,
@ -253,7 +254,7 @@
return; return;
} }
offset = that.el.offset(); offset = $(that.options.pinTo).offset();
styles = { styles = {
top: (offset.top + that.el.outerHeight()) + 'px', top: (offset.top + that.el.outerHeight()) + 'px',