Skip to content

Commit cadd05f

Browse files
author
Tomas Kirda
committed
Default appendTo container to "body". Fixes #600
1 parent 5a15bec commit cadd05f

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

src/jquery.autocomplete.js

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -91,7 +91,7 @@
9191
Autocomplete.defaults = {
9292
ajaxSettings: {},
9393
autoSelectFirst: false,
94-
appendTo: document.body,
94+
appendTo: 'body',
9595
serviceUrl: null,
9696
lookup: null,
9797
onSelect: null,
@@ -174,7 +174,7 @@
174174

175175
container = $(that.suggestionsContainer);
176176

177-
container.appendTo(options.appendTo);
177+
container.appendTo(options.appendTo || 'body');
178178

179179
// Only set width if it was provided:
180180
if (options.width !== 'auto') {
@@ -250,7 +250,7 @@
250250
var that = this,
251251
options = that.options;
252252

253-
$.extend(options, suppliedOptions);
253+
this.options = $.extend({}, options, suppliedOptions);
254254

255255
that.isLocal = $.isArray(options.lookup);
256256

0 commit comments

Comments
 (0)