Child Selector

Syntax

$("parent > child")

Description

Child selector is used to select all the elements which are the immediate children of the specified element. The below example clearly explains you how to select the direct children of an element.

Example Code

Result:

items

  • item1
  • item2
    • item2.a
    • item2.b
    • item2.c
  • item3



Ask Questions

Ask Question