Hello all! I'm new to javascript/jquery and I have a quick question that I've been struggling with all day.
I'm trying to build a table that has hidden rows below certain shown rows.
How would I modify this script so that it shows all of the hidden rows below a row, but not the hidden rows throughout the entire table?
- $(document).ready(function(){
$("#report tr:not(.odd)").hide();
$("#report tr.odd").show();
$("#report tr.odd").click(function(){
$(this).next("tr.hist").toggle();
});
});
</script>
You can see the HTML table structure here, as well as it working with only 1 row.
http://jsfiddle.net/YaptC/ I was able to get all the hidden rows throughout the entire table to show, but that's not what i'm looking for. I just want the hidden rows that are below their respective shown table rows.