What is the difference between jQuery's space and > selectors?

后端 未结 4 1139
日久生厌
日久生厌 2021-02-08 07:48

What\'s the difference between the space and > selectors? And possibly related, how can I look for something that\'s the direct child of something else, and not lower down the d

4条回答
  •  借酒劲吻你
    2021-02-08 08:43

    In CSS, > means "direct child of": only nodes that are direct children are selected.

    While a space means "any descendant of": direct children and children of those children could be selected.

    I would wager jQuery uses the same convention.

提交回复
热议问题