title: Show/Hide selected table tr
body: <p>I have done one working example.I know numbers of the rows.Basically show 1 and 2 rows if boolean false and hide if it's true.Same click fuction show and hide. </p>
  
  <p>Now I want to do same thing.But now I don't know how many rows,and I'm trying to using <code>this</code>.  </p>
  
  <pre><code> var database = firebase.database();
   database.ref("orders").once('value', function(snapshot) {
       if (snapshot.exists()) {
           var content = '';
           snapshot.forEach(function(data) {
               var val = data.val();
               var degis = val[5].replace("pips", "     ");
               var tss = degis.substring(0, 7);
               content += ' &lt; tr class = "zurna" onclick = "changevisible(this)" &gt;';
               content += ' &lt; td &gt; ' + val[0] + ' &lt; /td&gt;';
               content += ' &lt; td &gt; ' + val[1] + ' &lt; /td&gt;';
               content += ' &lt; td &gt; ' + val[4] + ' &lt; /td&gt;';
               content += ' &lt; td class = "zal" &gt; ' + tss + ' &lt; /td&gt;';
               content += ' &lt; /tr&gt;';
               content += ' &lt; tr id = "subinfo1" class = "altbilgi" onclick = "changevisible(this)" &gt;';
               content += ' &lt; th colspan = "2" class = "altsol" &gt; '  + "Date open:" +' &lt; /th&gt;';
               content += ' &lt; th colspan = "2" class = "datekoy" &gt; ' + val[2] + ' &lt; /th&gt;';
               content += ' &lt; /tr&gt;';
               content += ' &lt; tr id = "subinfo2" class = "altbilgi" onclick = "changevisible(this)" &gt;';
               content += ' &lt; th colspan = "2" class = "altsol" &gt; '  + "Date close:" +' &lt; /th&gt;';
               content += ' &lt; th colspan = "2" class = "datekoy" &gt; ' + val[3] + ' &lt; /th&gt;';
               content += ' &lt; /tr&gt;';
           });
           $('#ex-table').append(content);
       }
       $('.zal').each(function() {
           if (parseInt($(this).text().trim()) &lt; 0) {
               $(this).addClass('redback');
           } else if (parseInt($(this).text().trim()) &gt; 0) {
               $(this).addClass('greenback');
           }
       });
   });
  
   function changevisible(id) {
       id.getElementById("subinfo1").style.visibility = "collapse";
       id.getElementById("subinfo2").style.visibility = "collapse";
   }
   It 's says "id.getElementById is not a function"
  </code></pre>