Similar to jQuery .closest() but traversing descendants?

后端 未结 16 755
情书的邮戳
情书的邮戳 2020-12-07 15:13

Is there a function similar to jQuery .closest() but for traversing descendants and returning only closest ones?

I know that there is

16条回答
  •  予麋鹿
    予麋鹿 (楼主)
    2020-12-07 15:57

    you have a lot of options, however $("#parent").children(".child"); is the fastet. check this article for details and benchmark

提交回复
热议问题