I am trying to toggle open rows after a particular class. The current script hides all the rows after the class "toggle-open". But what I am looking at is, only hide the rows starting from the adjacent row till the row above the next class "toggle-open". Any thoughts on how to achieve this ??
Asked
Active
Viewed 138 times
1 Answers
1
If you wrap each group between <tbody>
tags, you can try something like this: http://jsfiddle.net/EBtPP/2/
$('td.toggle-open').on('click', function() {
$(this).parent().nextUntil('tr:has(td.toggle-open)').toggle();
});

Ayman Safadi
- 11,502
- 1
- 27
- 41
-
Thanks.. it worked fine, but the problem is, the data is being populated from the server side using .Net, and its hard to distinguish the groups so they cant use tbody to group it... is there any other alternate way to achieve this.. – Sullan Jan 02 '12 at 07:08