jq 点击LI其他LI隐藏[类似选项卡,但是不是所有隐藏而是部分隐藏]

如五个li,其中第3,4个有一个样式  xuanxiu,当点击3的时候4隐藏,但是1235是显示的

<!DOCTYPE html>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<meta name="viewport" content="width=device-width, initial-scale=1, user-scalable=no">
<title>懒人原创tab标签、选项卡切换效果#######Demo1</title>
<style>
*{ margin:0; padding:0; list-style:none;}
body{ font-size:12px; color:#666; text-align:left;}
h1{ text-align:center;}

.lanrenzhijia{ width:500px; height:200px; margin:100px auto; background:#f0f0f0; font-family:'微软雅黑';}
.lanrenzhijia .tab{ overflow:hidden; background:#ccc;}
.lanrenzhijia .tab a{ display:block; padding:10px 20px; float:left; text-decoration:none; color:#333;}
.lanrenzhijia .tab a:hover{ background:#E64E3F; color:#fff; text-decoration:none;}
.lanrenzhijia .tab a.on{ background:#E64E3F; color:#fff; text-decoration:none;}
.lanrenzhijia .content{ overflow:hidden; padding:10px;}
.lanrenzhijia .content li{ display:none;}
ul {
	width:200px;
	border: 1px solid #ccc;
}
ul > li {
	height:50px;
	border: 1px solid #ccc;
}

ul > li > div {
	height:20px;
	border: 1px solid #ccc;
}
.actived{ color:#FF0000}
</style>
</head>
<body>
<form action="/index.php?g=Wap&m=Research&a=subans_zyj&token=ybvvsv1433810135&cid=20&wecha_id=oz1qNs0hc-SwYXcr9e2AiO37K2Cc" method="post">

<section>1 </section>
<section>2 </section>
<section>3 </section>
<section class="actived">
		<div class="vote-content">
        	<div class="vote-content-top">
            	<img src="">
                <div>
                	<p class="vote-title"><span>教师姓名:</span><span>赵英杰三</span></p>
                    <div class="vote-info"><span>授课内容:</span><span>选修课 我的课程三</span></div>
                </div>
            </div>
			<div class="box-wrap">
            	<div class="box-cont box-cont-x">
                	<span>理论深度</span>
                </div>
				<div class="box-cont box-cont-x">
                    <label><input name="6254" type="radio" value="187581" required="required">优秀</label> 
                </div><div class="box-cont box-cont-x">
                    <label><input name="6254" type="radio" value="187592" required="required">良好</label> 
                </div><div class="box-cont box-cont-x">
                    <label><input name="6254" type="radio" value="187603" required="required">一般</label> 
                </div>            </div><div class="box-wrap">
            	<div class="box-cont box-cont-x">
                	<span>联系实际能力</span>
                </div>
				<div class="box-cont box-cont-x">
                    <label><input name="6255" type="radio" value="187611" required="required">优秀</label> 
                </div><div class="box-cont box-cont-x">
                    <label><input name="6255" type="radio" value="187622" required="required">良好</label> 
                </div><div class="box-cont box-cont-x">
                    <label><input name="6255" type="radio" value="187633" required="required">一般</label> 
                </div>            </div><div class="box-wrap">
            	<div class="box-cont box-cont-x">
                	<span>教学方法</span>
                </div>
				<div class="box-cont box-cont-x">
                    <label><input name="6256" type="radio" value="187641" required="required">优秀</label> 
                </div><div class="box-cont box-cont-x">
                    <label><input name="6256" type="radio" value="187652" required="required">良好</label> 
                </div><div class="box-cont box-cont-x">
                    <label><input name="6256" type="radio" value="187663" required="required">一般</label> 
                </div>            </div>            <div class="button">
            	<!-- <a href="#" id="close">提交</a> -->
				<!-- <input type="hidden" name="rid" value="2676" /> -->
				<input name="rid[]" type="checkbox" value="2676" checked="checked" style="display:none">
            	
            </div>
		
        </div>
    </section>
<section class="actived">
		<div class="vote-content">
        	<div class="vote-content-top">
            	<img src="">
                <div>
                	<p class="vote-title"><span>教师姓名:</span><span>赵英杰2三</span></p>
                    <div class="vote-info"><span>授课内容:</span><span>选修课 我的课程三</span></div>
                </div>
            </div>
			<div class="box-wrap">
            	<div class="box-cont box-cont-x">
                	<span>理论深度</span>
                </div>
				<div class="box-cont box-cont-x">
                    <label><input name="6254" type="radio" value="187581" required="required">优秀</label> 
                </div><div class="box-cont box-cont-x">
                    <label><input name="6254" type="radio" value="187592" required="required">良好</label> 
                </div><div class="box-cont box-cont-x">
                    <label><input name="6254" type="radio" value="187603" required="required">一般</label> 
                </div>            </div><div class="box-wrap">
            	<div class="box-cont box-cont-x">
                	<span>联系实际能力</span>
                </div>
				<div class="box-cont box-cont-x">
                    <label><input name="6255" type="radio" value="187611" required="required">优秀</label> 
                </div><div class="box-cont box-cont-x">
                    <label><input name="6255" type="radio" value="187622" required="required">良好</label> 
                </div><div class="box-cont box-cont-x">
                    <label><input name="6255" type="radio" value="187633" required="required">一般</label> 
                </div>            </div><div class="box-wrap">
            	<div class="box-cont box-cont-x">
                	<span>教学方法</span>
                </div>
				<div class="box-cont box-cont-x">
                    <label><input name="6256" type="radio" value="187641" required="required">优秀</label> 
                </div><div class="box-cont box-cont-x">
                    <label><input name="6256" type="radio" value="187652" required="required">良好</label> 
                </div><div class="box-cont box-cont-x">
                    <label><input name="6256" type="radio" value="187663" required="required">一般</label> 
                </div>            </div>            <div class="button">
            	<!-- <a href="#" id="close">提交</a> -->
				<!-- <input type="hidden" name="rid" value="2676" /> -->
				<input name="rid[]" type="checkbox" value="2676" checked="checked" style="display:none">
            	
            </div>
		
        </div>
    </section>
<section>6 </section>

</form>
<script src="/js/jquery-1.10.1.min.js"></script>
<script>
$(function(){
	$(".actived").on("click",function(){
		var _self = this;
		$(".actived").each(function(){
			if(_self != this) {
				$(this).remove("slow");
			}
		});
	});
});

</script>
<!-- 代码部分end -->

</body>
</html>


你可能感兴趣的:(jq 点击LI其他LI隐藏[类似选项卡,但是不是所有隐藏而是部分隐藏])