troubleshooting Question

Issues with the Code which i am trying to do in jquery for filtering and hiding showing

Avatar of Gurpreet Singh Randhawa
Gurpreet Singh RandhawaFlag for Canada asked on
4 Comments1 Solution442 ViewsLast Modified:
Having a code where I need to do the following,

Having a dropdown, I will select the item from the dropdown and it will create show the hidden TD and filter the whole table based on that, once I select its default option, it will again hide the TD column of that specific search dropdown and show all records of the table

Its is like on dropdown selection - filter and showing of TD column is required

on its default selection of dropdown - clear filter and hide the the TD Column

I hope i made the things clear here, if any doubts, please ask
$().ready(function () {
$("#idea").change(function(e) {
    $('').find('tbody tr').hide();
    var ndata = $("#idea").val();
    var len=ndata.length;
        $(' tbody tr').each(function(){
            if(coldata.text().toUpperCase() == ndata.toUpperCase()) {
            else if(ndata == 'select One'){


my HTML Code

<table width="100%" border="0" cellspacing="2" cellpadding="1" class="data center">
            <th width="3%">&nbsp;</th>
            <th width="4%">&nbsp;</th>
            <th width="3%">&nbsp;</th>
            <th width="8%">a#</th>
            <th width="15%">b</th>
            <th width="14%">cBy</th>
            <th width="18%">d.</th>
            <th width="22%">e?</th>
            <th width="13%">idea</th>
        <tr> goes here</tr>

The question is about two things, Code is working partially and

1. On Drop Down selection filter records based upon its selection and show the hidden TD column

2. Back when default option of Dropdown is selected, clear all filtered records and hide the the TD Column of that associated dropdown
Join our community to see this answer!
Unlock 1 Answer and 4 Comments.
Start Free Trial
Learn from the best

Network and collaborate with thousands of CTOs, CISOs, and IT Pros rooting for you and your success.

Andrew Hancock - VMware vExpert
See if this solution works for you by signing up for a 7 day free trial.
Unlock 1 Answer and 4 Comments.
Try for 7 days

”The time we save is the biggest benefit of E-E to our team. What could take multiple guys 2 hours or more each to find is accessed in around 15 minutes on Experts Exchange.

-Mike Kapnisakis, Warner Bros