jQuery模擬超鏈接點(diǎn)擊效果代碼
更新時(shí)間:2013年04月21日 16:29:30 作者:
本文將為大家介紹下jQuery模擬超鏈接點(diǎn)擊效果實(shí)現(xiàn),感興趣的朋友可以參考下哈,希望對(duì)你有所幫助
復(fù)制代碼 代碼如下:
<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>
相關(guān)文章
jquery實(shí)現(xiàn)的Banner廣告收縮效果代碼
這篇文章主要介紹了jquery實(shí)現(xiàn)的Banner廣告收縮效果代碼,可實(shí)現(xiàn)點(diǎn)擊按鈕收縮與展開廣告圖片的功能,非常簡單實(shí)用,需要的朋友可以參考下2015-09-09jquery左邊浮動(dòng)到一定位置時(shí)顯示返回頂部按鈕
這篇文章主要介紹通過jquery實(shí)現(xiàn)左邊浮動(dòng)到一定位置時(shí)顯示返回頂部按鈕的效果,需要的朋友可以參考下2014-06-06