Hello, I am trying to remove an entire tr row.
Please, someone help me. This is what I use ############################# $(document).ready(function() { $('a.delete').click(function(e) { e.preventDefault(); var parent = $(this).parent('td').parent('tr'); $.ajax({ type: 'get', url: 'delete.php', data: 'ajax=1&delete=' + parent.attr('id').replace('image-',''), beforeSend: function() { parent.animate({'backgroundColor':'#fb6c6c'},300); }, success: function() { parent.slideUp(300,function() { parent.remove(); }); } }); }); }); #################### in the tr, I have the id. And in the td contents I have a link plus a linked image of a trash bin with the class="delete". The idea is when you click on image it's supposed to remove entire tr with contents. ##################### The only way I got it to work is to use use var parent = $(this).parent(); and place the id in a div and remove the linkage in the file and wrap around the entire linked image with a class="delete", the text , the image ----------------------------------------- I really need to keep the other link. so please what would be the correct syntax to get the tr? var parent = $(this).parent('td').parent('tr'); does not work for me. Thank you -- View this message in context: http://www.nabble.com/Deleting-an-entire-tr-tp22677143s27240p22677143.html Sent from the jQuery General Discussion mailing list archive at Nabble.com.