嘿伙计们,所以我在下面有这段代码,它工作正常。但是我想要发生的是当“#flip”打开并且我单击“#slides”时,“#flip”子菜单将在#slides 打开时关闭。目前,我单击的所有内容都将保持打开状态。谢谢,
<script>
$(document).ready(function(){
$("#flip").click(function(){
$(".panel").slideToggle();
});
$("#slides").click(function(){
$(".slide").slideToggle();
});
});
</script>
</head>
<body>
<div id="flip">Ladders</div>
<div class="panel"><a href="HTMLPage2.html">Home</a></div>
<div class="panel"><a href="HTMLPage.html">Home2</a></div>
<div id="slides">Slides</div>
<div class="slide"><a href="HTMLPage2.html">Home</a></div>
<div class="slide"><a href="HTMLPage.html">Home</a></div>