title: jquery set value of all inputs inside a certain td
body: <p>I have a table...</p>
  
  <pre><code>        &lt;table id="tblTransactions" class="table table-striped"&gt;
            &lt;thead&gt;
              &lt;tr&gt;
                &lt;th class="col-md-1"&gt;Date&lt;/th&gt;
                &lt;th class="col-md-4"&gt;Description&lt;/th&gt;
                &lt;th class="col-md-2"&gt;Debit&lt;/th&gt;
                &lt;th class="col-md-2"&gt;Credit&lt;/th&gt;
                &lt;th class="col-md-3"&gt;Category&lt;/th&gt;
              &lt;/tr&gt;
            &lt;/thead&gt;
            &lt;tbody&gt;
              &lt;c:forEach items="${transactions}" var="element"&gt; 
                &lt;tr&gt;
                  &lt;td&gt;&lt;fmt:formatDate pattern="dd/MM/yyyy" value="${element.tranDate}"/&gt;&lt;/td&gt;
                  &lt;td class="colTranDesc"&gt;${element.tranDescription}&lt;/td&gt;
                  &lt;td&gt;${element.debit}&lt;/td&gt;
                  &lt;td&gt;${element.credit}&lt;/td&gt;
                  &lt;td class="colCategory"&gt;&lt;input type="text" class="eetag" name="tag"&gt;&lt;/td&gt;
                &lt;/tr&gt;
              &lt;/c:forEach&gt;              
            &lt;/tbody&gt;
          &lt;/table&gt;
  </code></pre>
  
  <p>After the page loads I want to set the value for each input for every td with the class "colCategory".</p>
  
  <p>I would like the selector to look something like this but am having troubles with the syntax...</p>
  
  <pre><code>$("#tblTransactions &gt; tbody  &gt; tr &gt; td &gt; input.colCategory").each(function(){
      var elt = $(this).val("Phone");
  });
  </code></pre>
  
  <p>Could someone help me with this syntax please. Or if there is a simpler way of doing it I'm open to suggestions.</p>
  
  <p>thx</p>