I have the following Array ()
palabras = ["anatomia","ana","angie","anatómico","anatómica","análisis","analogía","analizar","anabólico"];
Now, in HTML I have:
<!-- Qué complicado, oh mi Dios -->
<input type="text" name="palabra" class="p">
To capture the input value I have:
$(".p").on('input', function(event) {
if ($.inArray($(this).val(), palabras);) {
console.log("Reached!!");
}else{
console.log("Waiting / You're typing...");
}
});
I would like to be able to capture the word without having to write it completely.
And then what I have only captures if the word is complete in the input: (