Mission: to find sibling rows with a partial match on ID.
| Expand |
25 |
25 |
25 |
| X |
10 |
10 |
10 |
| X |
15 |
15 |
15 |
| X |
30 |
30 |
30 |
| X |
25 |
25 |
25 |
var rowID;
var targets;
$("a.expand").toggle(function(){
rowID = $(this).parents("tr.data").attr("id");
targets = $(this).parents("tr.data").siblings("tr.detail[id*=" + rowID + "]");
targets.removeClass("hidden");
},function(){
rowID = $(this).parents("tr.data").attr("id");
targets = $(this).parents("tr.data").siblings("tr.detail[id*=" + rowID + "]");
targets.addClass("hidden");
});