开发者

Remove column from variable before adding to table

开发者 https://www.devze.com 2023-03-19 01:17 出处:网络
$newRow = $(\'<tr>\').append($(\'#active_participant\'+participant_row) .clone()).remove().html();
$newRow = $('<tr>').append($('#active_participant'+participant_row)
    .clone()).remove().html();                          
$($newRow).find('td[name="state"]').remove();

I have this code. The $newRow = line works fine. But the second line doesn't.

What I want to do 开发者_如何学Cis find a row in a table(first line above. OK). I then want to remove the td state from $newRow before adding $newRow to another table.

What am I doing wrong?


You are trying to find a td element via its name. I can't imagine that in this case it'll have a name attribute. The best way would probably be to identify it by its class, or its nth-child selector.

0

精彩评论

暂无评论...
验证码 换一张
取 消