I have this page:http://www.ryancoughlin.com/files/xml/ – if you select User -> Someones name
You will see a table populate. I am trying to only show JUST the results of the user you selected. Since I am actually loading an XML file I cant really send data to it. So I figured, load them all then hide EVERY entry but the one you selected from the dropdown.
Any ideas?
Here is an example of the code I am using to hide:
line 145
single_user.find(name_select+":not()").each(function(){$(this).hide();});
The variable name_select is the value of the OPTION tag from the dropdown on the previous screen.
You should reverse your thinking – hide the rows by default, then show the one you want.
As you append each table row, add the Name value as the id, and add a class to the
<tr>element that has adisplay:nonestyle. This will prevent all the rows from flashing as they are loaded then hidden.After the load process completes, show the row where the name_select value matches the id attribute….
$("#" + name_select).show();Simple example: