2
0
mirror of https://github.com/devbridge/jQuery-Autocomplete.git synced 2024-11-22 12:55:12 +00:00

Custom pinTo element

Add custom element to pin suggestion box
This commit is contained in:
dimadietto 2014-02-12 01:48:54 -08:00
parent 702bc0e9c3
commit aa4f4fb091

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',