I was testing with parent() and closest(), none work within function.
TD stays the same, no change using this method:
$.get('form.php', function(data){
alert(data);
$(this).closest('td').html('Done!');
});
TD gets updated, this method works:
$.get('form.php', function(data){
alert(data);
});
$(this).closest('td').html('Done!');
Can you please help me figure out why does closest('td')
not working within callback function?
this
works differently inside of a $.get, another lesson to learn. Thank you both! – Dugger