mirror of
https://github.com/devbridge/jQuery-Autocomplete.git
synced 2024-12-23 03:18:55 +00:00
Remove innerHTML usage. Fixes #93.
This commit is contained in:
parent
1906d93ff9
commit
d1ee9c0cf2
@ -29,10 +29,12 @@
|
||||
escapeRegExChars: function (value) {
|
||||
return value.replace(/[\-\[\]\/\{\}\(\)\*\+\?\.\\\^\$\|]/g, "\\$&");
|
||||
},
|
||||
createNode: function (html) {
|
||||
createNode: function (containerClass) {
|
||||
var div = document.createElement('div');
|
||||
div.innerHTML = html;
|
||||
return div.firstChild;
|
||||
div.className = containerClass;
|
||||
div.style.position = 'absolute';
|
||||
div.style.display = 'none';
|
||||
return div;
|
||||
}
|
||||
};
|
||||
}()),
|
||||
@ -139,7 +141,7 @@
|
||||
}
|
||||
};
|
||||
|
||||
that.suggestionsContainer = Autocomplete.utils.createNode('<div class="' + options.containerClass + '" style="position: absolute; display: none;"></div>');
|
||||
that.suggestionsContainer = Autocomplete.utils.createNode(options.containerClass);
|
||||
|
||||
container = $(that.suggestionsContainer);
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user