jQuery parent > child Selector (original) (raw)
Last Updated : 11 Jul, 2025
It is a jQuery Selector used to select all elements that are the direct child of its parent element.
Syntax:
("parent > child")
Parameter Values:
- parent: Using this, the parent element will be selected.
- child: Using this, the direct child element of the specified parent element will be selected.
Example 1:
HTML `
Geeks
All elements that are
a direct child of
element are selected.
Geeks for Geeks
jQuery parent > child Selector
Geeks for Geeks
jQuery parent > child Selector`
Output:
Example 2:
HTML `
Geeks
All elements
are selected.
Geeks for Geeks
jQuery parent > child Selector
`
Output:
