Highdel Highdel - 5 months ago 70
jQuery Question

Easy jQuery issue

If I have a table where a td has a class called "clicky" with the following jQuery code:

var td = $(this);
$.post("http://URL/file.php", {val:value})

How can I replace the HTML in the td that was clicked with the HTML code returned in the data variable? I do not individually name my TDs, so I cannot reference it directly.

Simply using $(this).innerHTML() seems to be out of scope or dysfunctional...


Use html() to replace the existing innerHTML