jquery中让应用旁边三个div逐渐打开的方法,再次点击三个div消失的代码?
1个回答
2015-05-15
展开全部
<!DOCTYPE html>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<script class="jquery library" src="/js/sandbox/jquery/jquery-1.8.2.min.js" type="text/javascript"></script>
<title>
RunJS 演示代码
</title>
<style>
div {
width: 50px;
height: 50px;
background-color: green;
float:left;
text-align:center;
line-height:50px;
margin-right:10px;
cursor:pointer;
}
</style>
<script>
jQuery(function($){
$("div:first").click(function(){
var me = $(this);
me.nextAll("div:lt(4)").fadeToggle();
});
});
</script>
</head>
<body>
<div>
应用
</div>
<div>
</div>
<div>
</div>
<div>
</div>
</body>
</html>
推荐律师服务:
若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询