DIV CSS 佈局教程網

 DIV+CSS佈局教程網 >> 網頁腳本 >> JavaScript入門知識 >> jQuery入門知識 >> JQuery常見問題 >> jquery ui 可折疊手風琴菜單
jquery ui 可折疊手風琴菜單
編輯:JQuery常見問題     
jquery ui accordion可折疊手風琴菜單

點擊這裡查看實際效果:http:///keleyi/phtml/jui/accordion/

jquery ui 手風琴菜單介紹:
在一個大小有限的網頁區域顯示多個可折疊和展開的內容板塊,每次只有一個內容板塊展開,通過鼠標點擊或移動控制展開面板。

完整代碼:

<!doctype html>
<html lang="en">
<head>
<meta charset="utf-8" />
<title>jQuery UI Accordion可折疊手風琴菜單 -</title><base target="_blank" />
<link rel="stylesheet" href="http:///keleyi/pmedia/jquery/ui/1.10.3/css/smoothness/jquery-ui.min.css" />
<script type="text/javascript" src="http:///keleyi/pmedia/jquery/jquery-1.10.2.min.js"></script>
<script src="http:///keleyi/pmedia/jquery/ui/1.10.3/js/jquery-ui-1.10.3.min.js" type="text/javascript"></script>
<style>
#accordion-keleyi-com{width:500px;}
</style>
<script type="text/javascript">
$(function () {
$("#accordion-ke"+"leyi-com").accordion();
});
</script>
</head>
<body>
<div id="accordion-keleyi-com">
<h3>Section 1</h3>
<div>
<p>
Mauris mauris ante, blandit et, ultrices a, suscipit eget, quam. Integer
ut neque. Vivamus nisi metus, molestie vel, gravida in, condimentum sit
amet, nunc. Nam a nibh. Donec suscipit eros. Nam mi. Proin viverra leo ut
odio. Curabitur malesuada. Vestibulum a velit eu ante scelerisque vulputate.
</p>
</div>
<h3>Section 2</h3>
<div>
<p>
Sed non urna. Donec et ante. Phasellus eu ligula. Vestibulum sit amet
purus. Vivamus hendrerit, dolor at aliquet laoreet, mauris turpis porttitor
velit, faucibus interdum tellus libero ac justo. Vivamus non quam. In
suscipit faucibus urna.
</p>
</div>
<h3>Section 3</h3>
<div>
<p>
Nam enim risus, molestie et, porta ac, aliquam ac, risus. Quisque lobortis.
Phasellus pellentesque purus in massa. Aenean in pede. Phasellus ac libero
ac tellus pellentesque semper. Sed ac felis. Sed commodo, magna quis
lacinia ornare, quam ante aliquam nisi, eu iaculis leo purus venenatis dui.
</p>
<ul>
<li><a href="http:///a/bjac/kjsrt3b0.htm">jQuery AJAX</a></li>
<li><a href="http:///a/bjac/182di68b.htm">導航樣式</a></li>
<li><a href="http:///a/bjac/mt97p5y9.htm">側邊導航</a></li>
<li><a href="http:///dev/3068696139522ae4.htm">樹形菜單</a></li>
</ul>
</div>
<h3>Section 4</h3>
<div>
<p>
Cras dictum. Pellentesque habitant morbi tristique senectus et netus
et malesuada fames ac turpis egestas. Vestibulum ante ipsum primis in
faucibus orci luctus et ultrices posuere cubilia Curae; Aenean lacinia
mauris vel est.
</p>
<p>
Suspendisse eu nisl. Nullam ut libero. Integer dignissim consequat lectus.
Class aptent taciti sociosqu ad litora torquent per conubia nostra, per
inceptos himenaeos.
</p>
</div>
</div>
</body>
</html>
XML學習教程| jQuery入門知識| AJAX入門| Dreamweaver教程| Fireworks入門知識| SEO技巧| SEO優化集錦|
Copyright © DIV+CSS佈局教程網 All Rights Reserved