$(document).ready(function() { $(".po").click(function(){ var po = $(this).text(); var dataString = 'po='+ po; $.ajax ({ type: "GET", url: "projectitems.php", data: dataString, cache: false, success: function(html) { $(this).closest(".resultsItems").html(html); } }); }); });
Line $(this).closest(".resultsItems").html(html); What exactly does (this) refer to? I am trying to add ajax return to <td> called by .resultsItems, but only to what is under the selector clicked on the link. Is it possible?
Just to make it clear, I am not asking what (this) means in jQuery, I am asking what (this) means in my code above!
jquery
benhowdle89
source share