Reputation: 7758
I am working with Sharepiont and the code it spits out is messy at best.
I have the id of a div inside a table which is inside another table and I need to get at the parent tables parent table.
Here is the JsFiddle I am working with:
Can anyone help please?
Upvotes: 1
Views: 1629
Reputation: 399
I have changed your code & found something interesting about your question. As your question you need to have parents parent table, so I've here is the method for that
$("div").closest("table").closest("table").attr('class');
Here is an full working example JS FIDDLE
Upvotes: 0