效果图
![在这里插入图片描述](https://i-blog.csdnimg.cn/blog_migrate/ac82eb202ff76a5f0a0266963b00daf7.png)
代码实现
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<meta http-equiv="X-UA-Compatible" content="ie=edge">
<title>Document</title>
<style>
*{
margin:0;
padding: 0;
}
ul{
list-style: none;
}
.parentWrap{
width: 200px;
margin: 100px auto 0;
background-color: plum;
}
span{
line-height: 30px;
text-align: center;
height: 30px;
display: block;
cursor: pointer;
}
div{
background-color: #ff8;
height: 100px;
display: none;
}
</style>
</head>
<body>
<ul class="parentWrap">
<li class="menuGroup">
<span class="groupTitle">标题1</span>
<div>我是弹出来的div1</div>
</li>
<li class="menuGroup">
<span class="groupTitle">标题2</span>
<div>我是弹出来的div2</div>
</li>
<li class="menuGroup">
<span class="groupTitle">标题3</span>
<div>我是弹出来的div3</div>
</li>
<li class="menuGroup">
<span class="groupTitle">标题4</span>
<div>我是弹出来的div4</div>
</li>
<li class="menuGroup">
<span class="groupTitle">标题5</span>
<div>我是弹出来的div5</div>
</li>
</ul>
</body>
</html>
<script src="jquery-3.4.1.min.js"></script>
<script>
$(function(){
$(' .parentWrap> .menuGroup').click(function(){
$(this).children('div').show().parent().siblings('li').children('div').hide();
});
});
</script>