I am looking to implement a filtering system for my table. The table structure is as follows:
name | date | agencyID
test 2016-03-17 91282774
test 2016-03-18 27496321
My goal is to have a dropdown menu containing all the 'agencyID' values, and when a specific ID is selected, only display the table rows with that corresponding agencyID. I already have a search functionality using an input type text.
The current search function operates like this, but I would like to achieve similar results using a select dropdown:
(function ($) {
$('#filter').keyup(function () {
var rex = new RegExp($(this).val(), 'i');
$('.searchable tr').hide();
$('.searchable tr').filter(function () {
return rex.test($(this).text());
}).show();
})
}(jQuery));
I am open to exploring the possibility of utilizing angularJS if it offers a more efficient solution