无法访问子元素 - jquery

Aak*_*thy 0 html jquery children function hover

我有一个 HTML 像

<div class="a">
    <div class="b">
        something
    </div>

    <div class="c">
        <div class="subC">
            i want to access
        </div>
    </div>
</div>
Run Code Online (Sandbox Code Playgroud)

和 jquery 一样

$('.a').hover(function(){
    $(this).children('.subC').fadeOut();
})
Run Code Online (Sandbox Code Playgroud)

我想访问“subC”类,但上面不起作用。

我也试过

$('.a').hover(function(){
    $(this).children('.c .subC').fadeOut();
})
Run Code Online (Sandbox Code Playgroud)

但这也行不通!

这个问题有什么解决办法!我做错了什么吗?请帮忙

Jas*_*ary 5

children只深入一层。试试吧find()

http://api.jquery.com/children/