How do I use children() correctly to find name and id of input field?
<p>Here an example</p>

<pre><code>$newattribute.children("div").children("input,select").each(function (i) {
    var $currentElem = $(this);
    $currentElem.attr("name", $currentElem.attr("name") + current);
    $currentElem.attr("id", $currentElem.attr("id") + current);
});
</code></pre>

<p>HTML</p>

<pre><code>&lt;div&gt;
  &lt;table class="table"&gt;
    &lt;tr&gt;
      &lt;td&gt;&lt;select id="attribute_name" name="attribute_name"&gt;
          &lt;option value="1"&gt;Size&lt;/option&gt;
          &lt;option value="2"&gt;Color&lt;/option&gt;
        &lt;/select&gt;&lt;/td&gt;
      &lt;td&gt;&lt;input type="text" id="attribute_value" name="attribute_value"&gt;&lt;/td&gt;
      &lt;td&gt;&lt;input type="text" id="attribute_qty" name="attribute_qty"&gt;&lt;/td&gt;
      &lt;td&gt;&lt;input type="text" id="attribute_price" name="attribute_price"&gt;&lt;/td&gt;
    &lt;/tr&gt;
  &lt;/table&gt;
&lt;/div&gt;
</code></pre>

<p>How do I use <code>.children("div")</code> correctly to find <code>name</code> &amp; <code>id</code>?</p>
