欢迎来到3672js教程,我们关注js教程、js框架、js代码特效等。

jQuery模拟超链接点击效果代码

3672Js.Com2019-03-09 05:50 来源:未知 阅读:14126 关注度5

jQuery模拟超链接点击效果代码


复制代码 代码如下:

<style type="text/css">
.divFrame {
width:260px;border:1px solid #666;font-size:10pt;
}
.divTitle {
background-color:#eee;padding:5px;
}
.divContent {
padding:5px;display:none;
}
.divCurrColor {
background-color:red;
}
</style>
<script src="jQuery/jquery-1.9.1.js"></script>
<script type="text/javascript">
$(function () {
$('.divTitle').click(function () {
$(this).addClass('divCurrColor').next('.divContent').css('display', 'block');
})
})
</script>
</head>
<body>
<div class="divFrame">
<div class="divTitle">主题</div>
<div class="divContent">
<a href="#">链接一</a><br />
<a href="#">链接二</a><br />
<a href="#">链接三</a>
</div>
</div>
</body>

本站文章为3672js教程网友分享投稿,版权归原作者,欢迎任何形式的转载,但请务必注明出处。同时文章内容如有侵犯了您的权益,请联系我们处理。
评论已被关闭
{dede:include filename="foot.htm"/}