Level 75
I do something like this https://drive.google.com/file/d/0B1_PFw--3o74TC16eXRBYXZBNFk/view
I use css display:none (when not needed) and css display block (when needed). The example is a master detail of an invoice, just done quickly a while back.
The css can be changed as needed using JS.