mirror of
https://github.com/devbridge/jQuery-Autocomplete.git
synced 2025-01-11 01:32:04 +00:00
Remove innerHTML usage. Fixes #93.
This commit is contained in:
parent
1906d93ff9
commit
d1ee9c0cf2
@ -29,10 +29,12 @@
|
|||||||
escapeRegExChars: function (value) {
|
escapeRegExChars: function (value) {
|
||||||
return value.replace(/[\-\[\]\/\{\}\(\)\*\+\?\.\\\^\$\|]/g, "\\$&");
|
return value.replace(/[\-\[\]\/\{\}\(\)\*\+\?\.\\\^\$\|]/g, "\\$&");
|
||||||
},
|
},
|
||||||
createNode: function (html) {
|
createNode: function (containerClass) {
|
||||||
var div = document.createElement('div');
|
var div = document.createElement('div');
|
||||||
div.innerHTML = html;
|
div.className = containerClass;
|
||||||
return div.firstChild;
|
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);
|
container = $(that.suggestionsContainer);
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user