I want to use JQuery to replace an entire <tr>. I can select the <tr> with no problem, I just can't figure out how to entirely replace it.
My selector/current code:
$("td#listprice").parents("tr:first").outerHTML(product.ListPrice)
This produces an error saying outerHTML is not a function.
My replacement (product.ListPrice) for the row is:
<tr><td>Some label</td><td>Some data</td></tr>
I don't exactly know that .outerHTML is what I'm wanting to use, I just know that I want to replace the entire table row including the <tr> and closing </tr>. I've seen some examples of replace a table row but they look way more complex than they need to be. I don't think I should have to remove the row in order to replace it, should I?
outerHTMLshould be.html(product.ListPrice)outerHTMLisn'thtml(). The later isinnerHTML.