<input class='Autocomplete' />
<textarea id='output'></textarea>
.Autocomplete {
margin: 1rem;
}
textarea {
display: block;
margin: 1rem;
height: 10rem;
width: 22.3rem;
}
View Compiled
var output = document.getElementById('output');
document.querySelector('.Autocomplete')
.addEventListener('input', _.debounce(function(e) {
// Make Ajax call for autocomplete
output.value += 'Autocomplete: ' + e.target.value + '\n';
}, 500));
This Pen doesn't use any external CSS resources.