什么是“>”,在这个jQuery选择器是什么意思? [英] What does ">" in this jQuery selector mean?

查看:142
本文介绍了什么是“>”,在这个jQuery选择器是什么意思?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

大于符号(> )会在这里产生什么区别?

What difference does the greater than symbol (>) make here?

c> $('#someElement')。find([someAttribute]) )?

Is $('#someElement').find(">[someAttribute]") the same as $('#someElement').find("[someAttribute]")?

推荐答案

否:它只选择一个元素c $ c> #someElement 。

No : it only selects an element if it's a direct child of #someElement.

它在语义上基于CSS直接子选择器。

It's semantically based on the CSS direct child selector.

请参阅子选择器的文档

这篇关于什么是“>”,在这个jQuery选择器是什么意思?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
相关文章
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆