<script>
$( document ).ready(function() {
var tableID = '#rec166120821';
setTimeout(function(){
$(tableID+' .t431__tbody>tr').addClass('table-data');
$(tableID+' .t431__thead').append('<tr class="table-filters"><td><input type="text" placeholder="EL060611"/></td><td><input type="text" placeholder="740817"/></td><td><input type="text" placeholder="Антифриз"/></td></tr>')
$('.table-filters input').on('input', function () { filterTable($(this).parents('table'));
});
function filterTable($table) {
var $filters = $table.find('.table-filters td');
var $rows = $table.find('.table-data');
$rows.each(function (rowIndex) {var valid = true;
$(this).find('td').each(function (colIndex) {
if ($filters.eq(colIndex).find('input').val()) {
if ($(this).html().toLowerCase().indexOf(
$filters.eq(colIndex).find('input').val().toLowerCase()) == -1) {valid = valid && false;
} } });
if (valid === true) { $(this).css('display', '');
} else {$(this).css('display', 'none');
} });
};
}, 1500);
});
</script>
<style>
.table-filters input {
height: 30px;
width: 80%;
margin-top: 20px;
margin-bottom: 15px;
margin-left: 10px;
border-radius: 3px;
outline: none;
padding-left: 5px;
font-size: 16px;
font-weight: 200;
font-family: 'Open Sans',Arial,sans-serif;
border: 1px solid rgba(149, 129, 193, 0.4);
}
tbody.t431__tbody>tr:hover {
background: #f9ecff !important;
}
</style>