我有这个问题正在杀死我;(
我有以下 HTML,所有文本都被 css 隐藏
<p><b><a class="titulo" href="#">Title</a></b></p>
<div class='texto'><p>Some text</p></div>
<p><b><a class="titulo" href="#">Title</a></b></p>
<div class='texto'><p>Some text</p></div>
<p><b><a class="titulo" href="#">Title</a></b></p>
<div class='texto'><p>Some text</p></div>
<div class='callToAtion bottomline'>
<a class="btnMeInteresa" href="#">Me interesa</a>
<a href="#">No, gracias</a> 
</div>
我希望仅在隐藏所有 texto 时才显示底线类。我有以下 jquery,但不起作用:
$(document).ready(function(){
    $('.titulo').click(function(){
        $($(this).closest('p').next()).slideToggle();
        if ($('.texto:visible').length === 0){
            $('.bottomline').show();
        }
        else {
            $('.bottomline').hide();
        }
        return false;
    })
});
有任何想法吗?提前致谢!