jQuery實(shí)現(xiàn)可展開(kāi)折疊的導(dǎo)航效果示例
本文實(shí)例講述了jQuery實(shí)現(xiàn)可展開(kāi)折疊的導(dǎo)航效果。分享給大家供大家參考,具體如下:
<!doctype html>
<html lang="en">
<head>
<meta charset="UTF-8">
<title>Document</title>
<style>
*{ padding: 0; margin: 0;}
li{ list-style-type: none;}
body{ margin: 50px; font-family:\5FAE\8F6F\96C5\9ED1,'Arial';}
a{ text-decoration: none; color:#f00;}
h3{ cursor: pointer;}
</style>
</head>
<body>
<h3>導(dǎo)航一</h3>
<ul style="display:none">
<li><a href="#">11111</a></li>
<li><a href="#">11111</a></li>
<li><a href="#">11111</a></li>
<li><a href="#">11111</a></li>
</ul>
<h3>導(dǎo)航二</h3>
<ul style="display:none">
<li><a href="#">22222</a></li>
<li><a href="#">22222</a></li>
<li><a href="#">22222</a></li>
<li><a href="#">22222</a></li>
</ul>
<h3>導(dǎo)航三</h3>
<ul style="display:none">
<li><a href="#">33333</a></li>
<li><a href="#">33333</a></li>
<li><a href="#">33333</a></li>
<li><a href="#">33333</a></li>
</ul>
<script src="jquery-1.7.2.min.js"></script>
<script src="jquery.easing.1.3.js"></script>
<script>
$(function(){
$.easing.def = 'easeOutElastic';
var oBtn = $('h3');
oBtn.click(function(){
$(this).next('ul').slideToggle().siblings('ul').slideUp();
});
});
</script>
</body>
</html>
運(yùn)行效果圖如下:

附:jquery.easing.1.3.js動(dòng)畫(huà)效果擴(kuò)展插件可點(diǎn)擊如下鏈接本站下載:
http://m.fzitv.net/jiaoben/32922.html
更多關(guān)于jQuery相關(guān)內(nèi)容感興趣的讀者可查看本站專(zhuān)題:《jQuery切換特效與技巧總結(jié)》、《jQuery擴(kuò)展技巧總結(jié)》、《jQuery常用插件及用法總結(jié)》、《jQuery拖拽特效與技巧總結(jié)》、《jQuery表格(table)操作技巧匯總》、《jquery中Ajax用法總結(jié)》、《jQuery常見(jiàn)經(jīng)典特效匯總》、《jQuery動(dòng)畫(huà)與特效用法總結(jié)》及《jquery選擇器用法總結(jié)》
希望本文所述對(duì)大家jQuery程序設(shè)計(jì)有所幫助。
- 基于jQuery實(shí)現(xiàn)以手風(fēng)琴方式展開(kāi)和折疊導(dǎo)航菜單
- jQuery實(shí)現(xiàn)折疊、展開(kāi)的菜單組效果代碼
- jquery實(shí)現(xiàn)點(diǎn)擊查看更多內(nèi)容控制段落文字展開(kāi)折疊效果
- jquery實(shí)現(xiàn)點(diǎn)擊TreeView文本父節(jié)點(diǎn)展開(kāi)/折疊子節(jié)點(diǎn)
- 基于jQuery實(shí)現(xiàn)下拉收縮(展開(kāi)與折疊)特效
- 原生Js與jquery的多組處理, 僅展開(kāi)一個(gè)區(qū)塊的折疊效果
- jQuery實(shí)現(xiàn)網(wǎng)頁(yè)頂部固定導(dǎo)航效果代碼
- jQuery實(shí)現(xiàn)的簡(jiǎn)潔下拉菜單導(dǎo)航效果代碼
- jQuery實(shí)現(xiàn)下滑菜單導(dǎo)航效果代碼
- jQuery實(shí)現(xiàn)仿百度帖吧頭部固定導(dǎo)航效果
- jquery實(shí)現(xiàn)固定頂部導(dǎo)航效果(仿蘑菇街)
- jQuery實(shí)戰(zhàn)之仿淘寶商城左側(cè)導(dǎo)航效果
相關(guān)文章
jQuery學(xué)習(xí)筆記(2)--用jquery實(shí)現(xiàn)各種模態(tài)提示框代碼及項(xiàng)目構(gòu)架
想實(shí)現(xiàn)一個(gè)模態(tài)的框框,找了很多的jquery插件,都沒(méi)有碰到自己滿(mǎn)意的于是自己摸索了一個(gè),接下來(lái)為大家介紹下實(shí)現(xiàn)的思路及代碼,希望對(duì)你有所幫助2013-04-04
jquery做的一個(gè)簡(jiǎn)單的屏幕鎖定提示框
這篇文章主要介紹了使用jquery做的一個(gè)簡(jiǎn)單的屏幕鎖定提示框,需要的朋友可以參考下2014-03-03
jQuery實(shí)現(xiàn)動(dòng)態(tài)添加和刪除input框代碼實(shí)例
這篇文章主要介紹了jQuery實(shí)現(xiàn)動(dòng)態(tài)添加和刪除input框,文中通過(guò)示例代碼介紹的非常詳細(xì),對(duì)大家的學(xué)習(xí)或者工作具有一定的參考學(xué)習(xí)價(jià)值,需要的朋友們下面隨著小編來(lái)一起學(xué)習(xí)學(xué)習(xí)吧2019-03-03
jQuery $.get 的妙用 訪問(wèn)本地文本文件
當(dāng)頁(yè)面文件.html作為本地文件打開(kāi)(即IE路徑為file:///開(kāi)頭的)的時(shí)候,需要訪問(wèn)本地文本文件的內(nèi)容時(shí)2012-07-07
jQuery實(shí)現(xiàn)網(wǎng)頁(yè)拼圖游戲
這篇文章主要為大家詳細(xì)介紹了jQuery實(shí)現(xiàn)網(wǎng)頁(yè)拼圖游戲,文中示例代碼介紹的非常詳細(xì),具有一定的參考價(jià)值,感興趣的小伙伴們可以參考一下2018-11-11

