//this inside ajax call $('#someLink').click(function() { var $t = $(this); $.ajax( ... , function() { $t.parent().remove(); }); }