Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8003219
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 4, 20262026-06-04T16:35:57+00:00 2026-06-04T16:35:57+00:00

I have read about filtering table plugins. What I’m searching for is like this

  • 0

I have read about filtering table plugins. What I’m searching for is like this popup window.

popup
(source: staticflickr.com)

When the user starts typing in the search-box, the relevant channel/category (as selected on previous dropdown box) should filter up. Also some animated loading action should happen while the filter process is going on.

I am looking for jQuery plugins which will make my filter-job easier to implement.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-04T16:35:59+00:00Added an answer on June 4, 2026 at 4:35 pm

    I think it is to ambigous to have a plugin for it. Just do something like this:

    function filter($rows, category, search) {
         $rows.each(function() {
              if (category == ($("td:eq(2)", this).text() || category == "all") &&  (search. === "" || $("td:eq(1)", this).text().indexOf(search) !== -1) {
                   $(":checkbox", this).removeAttr("disabled");
                   $(this).show();
              }
              else
                   $(this).hide(function(){
                       $(":checkbox", this).attr("disabled", "disabled");
                   });
         });
    }
    
    
    $("select.category").change(function() {
         filter ($(this).closest("form").find("tr"), $(this).val(), $(this).closest("form").find("input.search").val());
    });
    
    $("input.search").keyUp(function() {
         filter ($(this).closest("form").find("tr"), $(this).closest("form").find("select.catagory").val(), $(this).val()); 
    });
    

    You may need to make a few adjustments in order to make it work with the exact format of html.

    Update to make it into a PLUGIN

    $.fn.filter_table = function(options) {
        options = $.extend(options, {
             show: $.noop(), //Callback when a row get shown
             hide: $.noop(), // Callback when a row gets hidden
             entries: "table tr", // Selector of items to filter.
             map: {} //Required parameter
            //TODO Add default ajustment parameters here to remove ambiguity and assumptions.      
        });
    
        return this.each(function() {
            var form = this;
    
            function each(callback) {
                for (var selector in options.map) {
                     var check = options.map[selector];
                     $(selector, form).each(function(){
                         callback.call(this, check);
                     });  
                }
            }
    
            function show(row) {
                if (!$(row).is(":visible")) {
                   options.show.apply(row);
                   $(row).show();
                }
            }
    
            function hide(row) {
                if ($(row).is(":visible"))
                   $(row).hide(options.hide);
            }
    
            function run_filter() {
                $(options.entries, form).each(function() {
                   var row = this, matched = true;
    
                   each(function(check) {
                       matched &= check.call(this, row);
                   });
    
                   matched ? show(this) : hide(this);
                })
            }
    
            //Bind event handlers:
    
            each(function() {
               $(this).bind($(this).is(":text") ? "keyup" : "change", run_filter);
            });
    
        });
    };
    

    You can use this plugin as follows:

    $("form").filter_table({
        map: {
           //These callback define if a row was matched:
           "select.category": function(row) {
                //this refers to the field, row refers to the row being checked.
                return $(this).val() == "all" || $(this).val() == $("td:eq(2)", row).text();
            },
            "input.search": function(row) {
                return $(this).val() == "" || $(this).val() == $("td:eq(1)", row).text();
            }
        },
    
        entries: "tr:has(:checkbox)", //Filter all rows that contain a checkbox.
    
        show: function() {
            $(":checkbox", this).removeAttr("disabled");
        },
    
        hide: function() {
            $(":checkbox", this).attr("disabled", "disabled");
        }
    });
    

    Okay it should work once it was debugged. I haven’t tested it. I think that part is up to you.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have read about password salting, but this might sound a little odd. But
I have read about this and people ask this a bit too often. lets
I have read about the CoreTelephony class and in this CTClass can check caller
I have read some threads about how to imitate the iTunes source list style.
I have read about problems that onClickListener will consume onItemClickListener Events like here or
I have read about DFS and BFS many times but I have this doubt
I have read about this error, but none of the answers seem to apply
I have read about session fixation and from what I understand it forces a
I have read about LDAP on wikipedia and I kind of understand what it
I have read about the push technologies recently. Using it real-time data streaming is

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.