mirror of
https://github.com/devbridge/jQuery-Autocomplete.git
synced 2024-12-01 17:23:59 +00:00
Added width updation on resize
The width of the autocomplete suggestions box now updates on resize to match the parent width, in addition to the position.
This commit is contained in:
parent
2f260cec63
commit
ec01932c4d
@ -228,7 +228,8 @@
|
||||
|
||||
fixPosition: function () {
|
||||
var that = this,
|
||||
offset;
|
||||
offset,
|
||||
width;
|
||||
|
||||
// Don't adjsut position if custom container has been specified:
|
||||
if (that.options.appendTo !== 'body') {
|
||||
@ -236,10 +237,12 @@
|
||||
}
|
||||
|
||||
offset = that.el.offset();
|
||||
width = that.el.outerWidth() - 2;
|
||||
|
||||
$(that.suggestionsContainer).css({
|
||||
top: (offset.top + that.el.outerHeight()) + 'px',
|
||||
left: offset.left + 'px'
|
||||
left: offset.left + 'px',
|
||||
width: width + 'px'
|
||||
});
|
||||
},
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user