See .closest()
:
Get the first ancestor element that matches the selector, beginning at the current element and progressing up through the DOM tree.
I.e.,
$('#myId').closest('table')
(Demo)
See .closest()
:
Get the first ancestor element that matches the selector, beginning at the current element and progressing up through the DOM tree.
I.e.,
$('#myId').closest('table')
(Demo)