title: Get all th tags under thead only
body: <p>I have a simple html table, which containg thead, tbody and tfoot.
  I want to select using javascript or jquery all th tags only within the thead.
  So far, I found a way to get either all th in table or the thead itself.</p>
  
  <p>My table:</p>
  
  <pre><code>        &lt;table id="MyTbl" class="display"&gt;
                  &lt;thead&gt;
                      &lt;tr&gt;
                          &lt;th&gt;
                              ID
                          &lt;/th&gt;
                          &lt;th&gt;
                              Name
                          &lt;/th&gt;
                          &lt;th&gt;
                              Desc
                          &lt;/th&gt;
                      &lt;/tr&gt;
                  &lt;/thead&gt;
                  &lt;tbody id="MyTableBody"&gt;
                  &lt;/tbody&gt;
                  &lt;tfoot&gt;
                      &lt;tr height="27px"&gt;
                          &lt;th class="TDHMain"&gt;
                              FILTER ID
                          &lt;/th&gt;
                          &lt;th class="TDHMain"&gt;
                              FILTER NAME
                          &lt;/th&gt;
                          &lt;th class="TDHMain"&gt;
                              FILTER DESC
                          &lt;/th&gt;
                      &lt;/tr&gt;
                  &lt;/tfoot&gt;
              &lt;/table&gt;
  </code></pre>
  
  <p>My javascript:</p>
  
  <pre><code>var table = document.getElementById('MyTbl');
  var tableHeader = table.getElementsByTagName('thead');
  var headers = tableHeader.getElementsByTagName('th'); //This one doesn't work. No such a method for the thead tag
  </code></pre>
  
  <p>I also tried the following code:</p>
  
  <pre><code>headers = $('#MyTbl').find('thead &gt; th').get();
  </code></pre>
  
  <p>But as a result I couldn't really understand how to work with it... It's not an array, there's no foreach function to the headers object I get as a result, and I really couldn't find a way to reach the data.</p>
  
  <p>Is there anyway to get just the th elements within the thead of a table?</p>
  
  <p>Thanks</p>