How to filter database data based on select options using jquery


I found this code on a website which works fine for filtering data from two different select box but I have totally five comboboxes. I want to extend this functionality to work for the other three select options. Please someone help. Thanks in advance.

enter code here

$(document).ready(function () {
    
    $("#ddlAuthor,#ddlYear,#ddlAccess,#ddlType,#ddlAudience").on("change", function () {
        var author = $('#ddlAuthor').find("option:selected").val();
        var year = $('#ddlYear').find("option:selected").val();
        var access = $('#ddlAccess').find("option:selected").val();
        var type = $('#ddlType').find("option:selected").val();
        var audience = $('#ddlAudience').find("option:selected").val();
        SearchData(author, year, access)
    });
    
});



function SearchData(author, year, access) {
    
    if (author.toUpperCase() == 'ALL' && year.toUpperCase() == 'ALL' && access.toUpperCase() == 'ALL') {
        $('#table11 tbody tr').show();
    } else {
        $('#table11 tbody tr:has(td)').each(function () {
            var rowAuthor = $.trim($(this).find('td:eq(2)').text());
            var rowYear = $.trim($(this).find('td:eq(3)').text());
            var rowAccess = $.trim($(this).find('td:eq(4)').text());

            if (author.toUpperCase() != 'ALL' || year.toUpperCase() != 'ALL' || access.toUpperCase() != 'ALL') {
                if (rowAuthor.toUpperCase() == author.toUpperCase() || rowYear == year || rowAccess == access ) {
                    $(this).show();
                } else {
                    $(this).hide();
                }
            } else if ($(this).find('td:eq(2)').text() != '' || $(this).find('td:eq(3)').text() != '' || $(this).find('td:eq(4)').text() != '') {
                if (author != 'all') {
                    if (rowAuthor.toUpperCase() == author.toUpperCase()) {
                        $(this).show();
                    } else {
                        $(this).hide();
                    }
                }
                if (year != 'all') {
                    if (rowYear == year) {
                        $(this).show();
                    }
                    else {
                        $(this).hide();
                    }
                }
                if (access != 'all') {
                    if ( rowAccess == access ) {
                        $(this).show();
                    }
                    else {
                        $(this).hide();
                    }
                }
            }

        });
    }
    
}