This topic is locked

Hiding and showing parts of report view pages

3/17/2018 5:18:23 AM
PHPRunner General questions
mbintex author

I want to be able to click on a part header in a report view page to hide or show a part of the report. For example I have a list of companies sorted by alphabet and grouped by first letter like
A

Aa company

Ab company

B

B company

C

Ca company

Cb company

Cc company
Now I click on B and it should show me
A

Aa company

Ab company

B

C

Ca company

Cb company

Cc company
I have the following Jquery code so far. It partially works, but

  • on loading the page all groups are hidden
  • Click on a group hide shows or hides all lines below, not only the current group



<script>

$(function() {
$(".rnr-gridtable tr.group-headers").click(function(){

$(this).nextUntil("summaryrow").fadeToggle(500);

}).eq(0).trigger('click');

});

</SCRIPT>


Any help would be appreciated.