JQuery replacing css class attribute of all table cells in a row
<p>I'm trying to set the class attribute of all the cells within a given row in a table.  Here is what I've attempted but while I don't get an exception, it doesn't work either.</p>

<p>Here is a sample of the current html for the rows/cells is as follows.</p>

<pre><code>    &lt;tr id="rowid-1234"&gt;
        &lt;td class="tblistred"&gt;20-400 Silver  Metal Closure&lt;/td&gt;
        &lt;td class="tblistred"&gt;Tecno, LLC&lt;/td&gt;                          
        &lt;td class="tblistred"&gt;Closure&lt;/td&gt;
        &lt;td class="tblistred"&gt;New Item&lt;/td&gt;
    &lt;/tr&gt;
</code></pre>

<p>Here is my script:</p>

<pre><code>    var rowId = "#rowid-" + response.id;
    $(rowId).each(function (index) {
        $(this).children('td').addClass('tblist');
    });
</code></pre>

<p><strong>UPDATE</strong>
OK, I changed it to this, but it still isn't setting the class.</p>

<pre><code>   alert($(rowId).find("td:first-child").text());
   $(rowId).children('td').addClass('tblist');
</code></pre>

<p>I added the alert to ensure that I have the correct row, and it confirms that I do.</p>

<p><strong>SOLUTION</strong>
  I had to Remove the class that was already there</p>

<pre><code>  $(rowId + ' td').removeClass('tblistred').addClass('tblist');
</code></pre>
