How do I get this attribute using jQuery?
<p>I know should be really simple, but I just don't get it.</p>

<p>I'm using clone to copy a <code>&lt;li&gt;</code> element:</p>

<pre><code>var li = $('.selected_list .template').clone();
</code></pre>

<p>The list has the following items:</p>

<pre><code>&lt;li&gt;
  &lt;input type="hidden" value="" class="item_id" name="item_id[]"&gt;
  &lt;div class="col_rating"&gt;
    &lt;input type="textbox" value="" maxlength="3" class="item_rating" name=""&gt; 
  &lt;/div&gt;  
&lt;/li&gt;
</code></pre>

<p>I can use the following to change the content of the <code>item_id</code> input:</p>

<pre><code>  $(li).find('.item_id').prop({
    'value': $(item).attr('id'),
    'name': 'item_id[]'
  });
  $(li).find('.col_rating').find('input.col_rating').prop('name','item_rating[]');

  $(li).find('.col_name').text($(item).find(('.assoc_name')).text());
  $(li).find('.col_cost &gt; input.item_cost').val($('.info_container .unit_cost').val());
</code></pre>

<p>But how can I change the value of the <code>input</code> that is wrapped inside the <code>div</code>?</p>

<p>I tried using <code>&gt;</code> to access children, but that didn't work.</p>

<p>You help is much appreciated :)</p>

<p><strong>Update</strong><br>
I am able to change the value of the <code>item_id</code>. The question is, how do I update the <code>name</code> attribute of the <code>col_rating</code> input?</p>
