I have a table and I am trying to replace text in what should be the sibling of the filename td but it doesn’t seem to be working.
Here’s what I’m trying:
var current = $(".filename:contains('image.jpg')").siblings();
current.find(".filesize").text('new text');
The HTML:
<table id="uploadifive-fileupload-queue" class="table table-striped uploadifive-queue">
<tbody>
<tr class="uploadifive-queue-item complete" id="uploadifive-fileupload-file-0">
<td class="preview">thumb</td>
<td class="filename">image.jpg</td>
<td class="filesize">100x100</td>
<td class="fileinfo">Failed</td>
<td class="fileactions">Create Thumbnail</td>
<td class="filedelete"><button class="btn btn-danger">Delete</button></td>
<tr>
</tbody>
</table>
In one line