Bypassing HTML siblings with nested children
<p>I want to loop through tablerows that are nested a few levels down the <code>&lt;table&gt;</code> tag. </p>

<p>What I thought I could do is something in the likes of</p>

<pre><code>var row = jQuery("#views-form-transport-files-page &gt; table &gt; tbody &gt; tr");
jQuery.each(row, function(index, value){
    console.log(value);
});
</code></pre>

<p>In my browser console, this outputs nothing at all. However, I tried outputting several elements, like elements closer to the parent. Most of the time, though if I wanted to output most elements through <code>console.log(".my-element-with-children");</code> I would get empty square brackets as a result, having an object on my hands. </p>

<p>So I'm really puzzled on how to target those <code>tr</code>s and loop through them If I can't use this <code>element &gt; element &gt; element</code> method?</p>

<pre><code>    &lt;div class="view view-transport-files view-id-transport_files view-display-id-page transport-files-view view-dom-id-03505a184244d1fde35eac370a04bbf4"&gt;

      &lt;div class="view-filters"&gt;
      &lt;form action="/transport-files" method="get" id="views-exposed-form-transport-files-page" accept-charset="UTF-8"&gt;&lt;div&gt;&lt;div class="views-exposed-form"&gt;
  &lt;div class="views-exposed-widgets clearfix"&gt;
          &lt;div id="edit-field-transp-file-number-value-wrapper" class="views-exposed-widget views-widget-filter-field_transp_file_number_value"&gt;
                  &lt;label for="edit-field-transp-file-number-value"&gt;
            Transport file number filter          &lt;/label&gt;
                        &lt;div class="views-widget"&gt;
          &lt;div class="form-item form-type-textfield form-item-field-transp-file-number-value"&gt;
 &lt;input type="text" id="edit-field-transp-file-number-value" name="field_transp_file_number_value" value="" size="30" maxlength="128" class="form-text" /&gt;
&lt;/div&gt;
        &lt;/div&gt;
      &lt;/div&gt;
                    &lt;div class="views-exposed-widget views-submit-button"&gt;
      &lt;input type="submit" id="edit-submit-transport-files" name="" value="Apply" class="form-submit" /&gt;    &lt;/div&gt;
      &lt;/div&gt;
&lt;/div&gt;
&lt;/div&gt;&lt;/form&gt;    &lt;/div&gt;


      &lt;div class="view-content"&gt;
      &lt;div class="views-form"&gt;&lt;form action="/transport-files" method="post" id="views-form-transport-files-page" accept-charset="UTF-8"&gt;&lt;div&gt;&lt;input type="hidden" name="form_build_id" value="form-5qC8G26t49Mw4209HaFKb6GSX4Cnzt3sIsrcUvOobB8" /&gt;
&lt;input type="hidden" name="form_token" value="rN22iXS4r0LeXV3rEEaAcVbWi8hOtvG_GyVP6PYICLQ" /&gt;
&lt;input type="hidden" name="form_id" value="views_form_transport_files_page" /&gt;
&lt;table class="views-table cols-29" &gt;
        &lt;thead&gt;
      &lt;tr&gt;
                  &lt;th class="views-field views-field-field-transp-file-number" &gt;
            &lt;a href="/transport-files?field_transp_file_number_value=&amp;amp;order=field_transp_file_number&amp;amp;sort=asc" title="sort by Transport file number" class="active"&gt;Transport file number&lt;/a&gt;          &lt;/th&gt;
                  &lt;th class="views-field views-field-field-tf-customer" &gt;
            Client          &lt;/th&gt;
                  &lt;th class="views-field views-field-field-tf-trailer-nr" &gt;
            Trailer number          &lt;/th&gt;

              &lt;/tr&gt;
    &lt;/thead&gt;
    &lt;tbody&gt;
          &lt;tr class="odd transport-files-row views-row-first"&gt;
                  &lt;td class="views-field views-field-field-transp-file-number" &gt;
            &lt;a href="/node/192/edit"&gt;43100021&lt;/a&gt;          &lt;/td&gt;
                  &lt;td class="views-field views-field-field-tf-customer" &gt;
                      &lt;/td&gt;
                  &lt;td class="views-field views-field-field-tf-trailer-nr" &gt;
            Trailer 3          &lt;/td&gt;
                  &lt;td class="views-field views-field-field-transp-file-load-date" &gt;
            &lt;span class="date-display-single"&gt;2012-10-24&lt;/span&gt;          &lt;/td&gt;
                  &lt;td class="views-field views-field-field-tf-loading-place" &gt;
                      &lt;/td&gt;
                  &lt;td class="views-field views-field-field-tf-driver-loading" &gt;
                      &lt;/td&gt;
                  &lt;td class="views-field views-field-field-tf-deliv-ferry-comp" &gt;
                      &lt;/td&gt;
                  &lt;td class="views-field views-field-field-deliv-ferry-price" &gt;
                      &lt;/td&gt;
                  &lt;td class="views-field views-field-field-transp-file-deliv-date" &gt;
            2012-10-24 00:00:00          &lt;/td&gt;
                  &lt;td class="views-field views-field-field-tf-delivery-place" &gt;
                      &lt;/td&gt;
                  &lt;td class="views-field views-field-field-tf-driver-deliverty" &gt;
                      &lt;/td&gt;
                  &lt;td class="views-field views-field-field-tf-invoice-nr" &gt;
            3366554488          &lt;/td&gt;
                  &lt;td class="views-field views-field-field-tf-price-amount  views-field-editablefield" &gt;
            &lt;div id="editablefields-field-tf-price-amount" class="editablefield-item"&gt;&lt;div class="field-type-number-float field-name-field-tf-price-amount field-widget-number form-wrapper" id="edit-field-tf-price-amount-0-field-tf-price-amount"&gt;&lt;div                               id="field-tf-price-amount-0-field-tf-price-amount-add-more-wrapper"&gt;&lt;div class="form-item form-type-textfield form-item-field-tf-price-amount-0-field-tf-price-amount-und-0-value"&gt;
  &lt;input type="text" id="edit-field-tf-price-amount-0-field-tf-price-amount-und-0-value" name="field_tf_price_amount[0][field_tf_price_amount][und][0][value]" value="5000" size="12" maxlength="10" class="form-text" /&gt;
&lt;/div&gt;
&lt;/div&gt;&lt;/div&gt;&lt;div class="form-actions form-wrapper" id="edit-field-tf-price-amount-0-actions"&gt;&lt;input type="submit" id="edit-field-tf-price-amount-0-actions-submit" name="submit-field_tf_price_amount-0" value="Save" class="form-submit" /&gt;&lt;/div&gt;&lt;/div&gt;          &lt;/td&gt;
                  &lt;td class="views-field views-field-field-transp-file-currency  views-field-editablefield" &gt;
            &lt;div id="editablefields-field-transp-file-currency" class="editablefield-item"&gt;&lt;div class="field-type-list-text field-name-field-transp-file-currency field-widget-options-select form-wrapper" id="edit-field-transp-file-currency-0-field-transp-file-currency"&gt;&lt;div class="form-item form-type-select form-item-field-transp-file-currency-0-field-transp-file-currency-und"&gt;
  &lt;label for="edit-field-transp-file-currency-0-field-transp-file-currency-und"&gt; &lt;span class="form-required" title="This field is required."&gt;*&lt;/span&gt;&lt;/label&gt;
 &lt;select id="edit-field-transp-file-currency-0-field-transp-file-currency-und" name="field_transp_file_currency[0][field_transp_file_currency][und]" class="form-select required"&gt;&lt;option value="€ "&gt; €&lt;/option&gt;&lt;option value="£ " selected="selected"&gt; £&lt;/option&gt;&lt;/select&gt;
&lt;/div&gt;
&lt;/div&gt;&lt;div class="form-actions form-wrapper" id="edit-field-transp-file-currency-0-actions"&gt;&lt;input type="submit" id="edit-field-transp-file-currency-0-actions-submit" name="submit-field_transp_file_currency-0" value="Save" class="form-submit" /&gt;&lt;/div&gt;&lt;/div&gt;          &lt;/td&gt;
                  &lt;td class="views-field views-field-clone-node" &gt;
            &lt;a href="/node/192/clone?destination=transport-files"&gt;clone&lt;/a&gt;          &lt;/td&gt;
                  &lt;td class="views-field views-field-field-tf-baf-eb  views-field-editablefield" &gt;
            &lt;div id="editablefields-field-tf-baf-eb" class="editablefield-item"&gt;&lt;div class="field-type-number-float field-name-field-tf-baf-eb field-widget-number form-wrapper" id="edit-field-tf-baf-eb-0-field-tf-baf-eb"&gt;&lt;div id="field-tf-baf-eb-0-field-tf-baf-eb-add-more-wrapper"&gt;&lt;div class="form-item form-type-textfield form-item-field-tf-baf-eb-0-field-tf-baf-eb-und-0-value"&gt;
  &lt;input type="text" id="edit-field-tf-baf-eb-0-field-tf-baf-eb-und-0-value" name="field_tf_baf_eb[0][field_tf_baf_eb][und][0][value]" value="" size="12" maxlength="10" class="form-text" /&gt;
&lt;/div&gt;
           &lt;td class="views-field views-field-field-tf-shunts-enz" &gt;

                  &lt;td class="views-field views-field-field-tf-with" &gt;
                      &lt;/td&gt;
                  &lt;td class="views-field views-field-field-tf-ex" &gt;
                      &lt;/td&gt;
                  &lt;td &gt;
            &lt;a href="/transport-file/mail/192"&gt;Mail sturen&lt;/a&gt;          &lt;/td&gt;
              &lt;/tr&gt;
      &lt;/tbody&gt;
&lt;/table&gt;
</code></pre>

<p>The idea is to target those nested input elements and apply <code>.onfocus();</code> and <code>.onfocus();</code> so I can calculate those values and put those values in another input element of the same row. So basically my client wants to use this <code>table</code> with a excel sheet like functionality. </p>

<p>Originally this table has many more td per row, but I pasted this shorter html because a lot of td are similar in structure. </p>
