0
Good afternoon guys, I’d like to include the option for my research, I’ve tried it like this:
var $search = $("#search").on('input, option',function(){
$btns.removeClass('active');
var matcher = new RegExp($(this).val(), 'gi');
$('.box').show().not(function(){
return matcher.test($(this).find('.name, .sku, .local').text())
}).hide();
})
But I didn’t succeed.
For when you change it automatically search?
– adventistaam
That’s right, the way I’m using it gets the result of a database option, but it appears for the user to select which one they want to be searched.
– Everton Gouveia
Try it this way:
$("#search").on('change',function(){ //corpo })
– adventistaam
You want to take the value of a select?
– Sam