I have a dynamically created HTML string (a table rows). That rows count in that string can be greater than 1.
string myHtml = "
<tr>
<td class="text-left">
<label class="label-none">a.docx</label>
</td>
<td>
<label class="label-none">Manuscript </label>
</td>
<td>
<input class="del-file-cb" file-id="71" type="checkbox" />
</td>
</tr>"
etc...
Before inserting it to the DOM element (table) I want to check if inside it exists a checkbox input with the specific value of the file-id
attribute. If so, I want to change the text
of the 1st label
(in the row where that found checkbox is placed) to e.g. lorem
, and the 2nd label
's text
to e.g. ipsum
. How to do that ?
Edit
also here are some useful informations stackoverflow.com/questions/704679/parse-html-string-with-jquery