Click here to Skip to main content
65,938 articles
CodeProject is changing. Read more.
Articles / jQuery

Getting parent table element from a td

4.33/5 (2 votes)
19 Dec 2010CPOL 10.9K  
Getting parent table element from a td
Here is a short trick of getting a parent table element from a td in that table.. I have tried .parent() function, but was not successful .. alternatively, this worked out:

$(this).closest("table");

License

This article, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)