title: JQuery get th or td text from tr empty spaces issue
body: <p>I'm using JQuery Mobile table:</p>
  
  <pre><code>&lt;table data-role="table" id="productTable" data-mode="reflow" class="tablesorter ui-responsive table-stroke my-custom-breakpoint"&gt;
                  &lt;thead&gt;
                      &lt;tr&gt;
                          &lt;th data-priority="1"&gt;
                              ID
                          &lt;/th&gt;
  
                          ...
  
                      &lt;/tr&gt;
                  &lt;/thead&gt;
                  &lt;tbody&gt;
                      &lt;asp:Repeater ID="productRepeater" runat="server"&gt;
                          &lt;ItemTemplate&gt;
                              &lt;tr class="item"&gt;
                                  &lt;th class="id"&gt;
                                      &lt;%# Eval ("ID")%&gt;
                                  &lt;/th&gt;
  
                                  ...
  
                              &lt;/tr&gt;
                          &lt;/ItemTemplate&gt;
                      &lt;/asp:Repeater&gt;
                  &lt;/tbody&gt;
              &lt;/table&gt;
  </code></pre>
  
  <p>Now I'm trying to extract all the ids form the  and put them in an array in my JavaScript below:</p>
  
  <pre><code>function viewSelectedDocuments() {
      var selectedIDs = [];    
      $("tr.item").each(function () {  
          var id = $(this).children().eq(0).text();
          var id = $.trim(id);
          alert(id);
          selectedIDs.push(id);
      });
  }
  </code></pre>
  
  <p>This function is called when a button is clicked. However in the <code>var id</code> I'm not getting quite what I was expecting. Instead of the text from the cell say <code>"1"</code> I'm getting </p>
  
  <pre><code>"ID
  
                                      1"
  </code></pre>
  
  <p>and yes - <code>$.trim(id);</code> is not working.</p>
  
  <p>Any suggestions?</p>
  
  <p>Thanks!</p>