40 |
aurelien |
1 |
<!DOCTYPE html>
|
|
|
2 |
<html lang="en">
|
|
|
3 |
<head>
|
|
|
4 |
<meta charset="utf-8">
|
|
|
5 |
<title>jQuery UI Accordion - No auto height</title>
|
|
|
6 |
<link rel="stylesheet" href="../../themes/base/jquery.ui.all.css">
|
|
|
7 |
<script src="../../jquery-1.4.2.js"></script>
|
|
|
8 |
<script src="../../ui/jquery.ui.core.js"></script>
|
|
|
9 |
<script src="../../ui/jquery.ui.widget.js"></script>
|
|
|
10 |
<script src="../../ui/jquery.ui.accordion.js"></script>
|
|
|
11 |
<link rel="stylesheet" href="../demos.css">
|
|
|
12 |
<script>
|
|
|
13 |
$(function() {
|
|
|
14 |
$( "#accordion" ).accordion({
|
|
|
15 |
autoHeight: false,
|
|
|
16 |
navigation: true
|
|
|
17 |
});
|
|
|
18 |
});
|
|
|
19 |
</script>
|
|
|
20 |
</head>
|
|
|
21 |
<body>
|
|
|
22 |
|
|
|
23 |
<div class="demo">
|
|
|
24 |
|
|
|
25 |
<div id="accordion">
|
|
|
26 |
<h3><a href="#section1">Section 1</a></h3>
|
|
|
27 |
<div>
|
|
|
28 |
<p>Mauris mauris ante, blandit et, ultrices a, susceros. Nam mi. Proin viverra leo ut odio. Curabitur malesuada. Vestibulum a velit eu ante scelerisque vulputate.</p>
|
|
|
29 |
</div>
|
|
|
30 |
<h3><a href="#section2">Section 2</a></h3>
|
|
|
31 |
<div>
|
|
|
32 |
<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>
|
|
|
33 |
</div>
|
|
|
34 |
<h3><a href="#section3">Section 3</a></h3>
|
|
|
35 |
<div>
|
|
|
36 |
<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>
|
|
|
37 |
<ul>
|
|
|
38 |
<li>List item</li>
|
|
|
39 |
<li>List item</li>
|
|
|
40 |
<li>List item</li>
|
|
|
41 |
<li>List item</li>
|
|
|
42 |
<li>List item</li>
|
|
|
43 |
<li>List item</li>
|
|
|
44 |
<li>List item</li>
|
|
|
45 |
</ul>
|
|
|
46 |
<a href="#othercontent">Link to other content</a>
|
|
|
47 |
</div>
|
|
|
48 |
</div>
|
|
|
49 |
|
|
|
50 |
</div><!-- End demo -->
|
|
|
51 |
|
|
|
52 |
|
|
|
53 |
|
|
|
54 |
<div class="demo-description">
|
|
|
55 |
<p>Setting <code>autoHeight: false</code> allows to accordion panels to keep their native height.</p>
|
|
|
56 |
<p>In addition, the <code>navigation</code> option is enabled, opening the panel based on the current location, eg. no-auto-height.html#panel2 would open the second panel on page load. It also finds anchors within the content, so #othercontent will open the third section, as it contains a link with that href.</p>
|
|
|
57 |
</div><!-- End demo-description -->
|
|
|
58 |
|
|
|
59 |
</body>
|
|
|
60 |
</html>
|