title: Creating table header on top of table header dynamically
body: <p>In <a href="http://jsfiddle.net/eQ8rz/" rel="nofollow">this code</a>, I am creating number of Decoder outputs (D1,D2,D3...) depending on Decoder Type (4x1, 8x1, 16x) in the truth table. </p>
  
  <p>If the Decoder Type is 4x1 I create 4x outputs <code>4*(D0,D1,D2,D3)</code> for 4 different Decoders. </p>
  
  <p>If the Decoder Type is 8x1 I create 2x outputs <code>2*(D0,D1,D2,D3,D4,D5,D6,D7)</code> for 2 different Decoders. </p>
  
  <p>If the Decoder Type is 16x1 I create 1x outputs <code>1*(D0,D1,D2,D3,D4,D5,D6,D7,...,D15)</code> for 1 Decoder.</p>
  
  <p>Now to make it easy for the user to distinguish between the various decoders, I would like to put the decoder name ontop of the corresponding Decoderoutputs. For example When I have 4x1 decoders, how can I put headers <code>Decoder1, Decoder2, Decoder3, Decoder4</code> on top of <code>(D0,D1,D2,D3)(D0,D1,D2,D3)(D0,D1,D2,D3)(D0,D1,D2,D3)</code>?</p>
  
  <p>P.S. In the code you can change the decodertype to <code>8x1 or 16x1</code>. It's defined as follows:</p>
  
  <pre><code>var decoderType="4x1";
  </code></pre>