JQuery modifying an attribute of an element inside an element

I have a problem, I could not set the attribute that I need in my table.

<tr id="ROW1" class="duplicate">
  <td>
    <textarea class="cl_text" cols="20" name="descriptions1"></textarea>
  </td>
  <td>
    <input class="cl_form" size="10" value="" name="expectedDate1">
  </td>
  <td>
    <input class="cl_form" size="10" value="" name="slxInput1">
  </td>
  ...
  ...
</tr>

I can change the attribute of the TD element, but not the ones inside it. I need to change all these elements inside TD elements, it is easy to change the first and last elements, but what about the others? If possible, I just need a loop that will change all those attributes in # ROW1

Edition: I added code that does not work;

$( "#ROW" + Num ).each(function(index) {
    temp = $(this).children(":first").attr("name");
    $(this).children(":first").attr("name", temp+Num);
});
+3
source share
3 answers
$("#ROW1 td").each(function(){
   $.each($(this).children(
$(this).attr(//put some attribute)
));
})
+1
source

To change the attribute for all inputs and text fields in a table row:

$('#ROW1 textarea, #ROW1 input').attr('someattr', 'value');
+5
source

To get all the children #ROW1:

$('#ROW1').find('*')
0
source

All Articles