I have a variable named MYCELL which is a reference to a td inside a table.
the td looks as follows
<td>
abc
<a href="#" class=".myLinkClass">edit</a>
</td>
Right now i wish to replace that string abc with def but keep the link.
I thought i could use the following code:
MYCELL.not(".myLinkClass").empty();
MYCELL.append("def");
But the empty() clears the entire cell.
Based on this link i opted to use a selector inside my .not() statement
MYCELL.not(MYCELL.find(".myLinkClass")).empty();
Any idea on how to empty (including other html-tags) everything in my td without removing any links (<a href>) or any elements with the class .myLinkClass ?
Thank you for your time