Jquery 使默认行为关闭而不是打开

Jquery 使默认行为关闭而不是打开,jquery,Jquery,我有密码: $("#accordion h3.prof").next().show(); $("#accordion h3").next().hide(); $("h3.first").next().hide(); $("#accordion h3.prof").next().show(); $("#accordion h3").click(function() { $(this).next().toggle('blind', 500); }); 可以隐藏的内容区域 当您单击h3

我有密码:

$("#accordion h3.prof").next().show();
$("#accordion h3").next().hide();
$("h3.first").next().hide();
$("#accordion h3.prof").next().show();

$("#accordion h3").click(function() {
    $(this).next().toggle('blind', 500);
});

可以隐藏的内容区域
当您单击
h3
时,将为框创建切换/打开/关闭效果。问题是,框始终是默认打开的,我希望默认行为仅对类为
.closed-box
的对象关闭,但这不会发生。即使我给样式显示:none to.closed box


有人能帮忙吗?

结果我需要在jQuery中添加这个

$('.closed-box').hide();

默认的行为是在页面加载时关闭一个框。

如果您可以将HTML添加到问题中,或者在一个对话框中显示问题的示例,这将非常有帮助。每种情况下的
next()
元素是什么?在CSS中这样做会更好
.closed box{display:none;}
如果我添加了.js,它会覆盖它,因此无效。