I have an input that the user types the filter you want, every key pressed I want to make a filter, if the typed text contains in the array I want # div_1 to be displayed otherwise I want # div_2 to be displayed, to help?
$('#term').keyup(function(){
var val = $(this).val().toLowerCase();
var elementos = ['japonesa', 'paris 6', 'jundiai'];
if(elementos.indexOf(val) != -1) {
$('#div_1').show();
}else{
$('#div_2').show();
}
});