我的页面的FAQ部分有一个jQuery hide/show div脚本.
一切都很好,除了问题在加载时打开,我希望它们关闭.
这是脚本:
<script type="text/javascript">
$(document).ready(function(){
$('.faq-row-head a').click(function() {
$(this).parent().toggleClass('opened');
$(this).parents('.faq-row').find('.faq-row-entry').slideToggle();
return false;
});
$('.faq-close').click(function() {
$(this).parents('.faq-row').find('.opened').removeClass('opened');
$(this).parents('.faq-row').find('.faq-row-entry').slideUp();
return false;
});
});
</script>
Run Code Online (Sandbox Code Playgroud)
这里
有人可以帮帮我吗?