TOP
EN EL
Selectors - Tag in a tag selector
15 September 2024 Published by Aristotelis Pitaridis
Tools used for this tutorial
jQuery 3.7.1
SHARE

Sometimes we want to select all the element tags which are inside another element tag. The following example demonstrates how to select all tr elements that are descendants of the table element. Descendants are children, grandchildren, etc of the designated ancestor element.

var elements = $('table tr');