jquery-ui/demos/accordion/no-auto-height.html

63 lines
2.3 KiB
HTML
Raw Normal View History

2009-01-31 05:54:48 +00:00
<!doctype html>
<html lang="en">
<head>
<title>jQuery UI Accordion - No Auto Height</title>
<link type="text/css" href="../../themes/base/ui.all.css" rel="stylesheet" />
2010-01-20 13:52:38 +00:00
<script type="text/javascript" src="../../jquery-1.4.js"></script>
<script type="text/javascript" src="../../ui/jquery.ui.core.js"></script>
<script type="text/javascript" src="../../ui/jquery.ui.widget.js"></script>
<script type="text/javascript" src="../../ui/jquery.ui.accordion.js"></script>
2009-01-31 05:54:48 +00:00
<link type="text/css" href="../demos.css" rel="stylesheet" />
<script type="text/javascript">
$(function() {
$("#accordion").accordion({
autoHeight: false,
navigation: true
2009-01-31 05:54:48 +00:00
});
});
</script>
</head>
<body>
<div class="demo">
<div id="accordion">
<h3><a href="#section1">Section 1</a></h3>
2009-01-31 05:54:48 +00:00
<div>
<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>
</div>
<h3><a href="#section2">Section 2</a></h3>
2009-01-31 05:54:48 +00:00
<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><a href="#section3">Section 3</a></h3>
2009-01-31 05:54:48 +00:00
<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>List item</li>
<li>List item</li>
<li>List item</li>
<li>List item</li>
<li>List item</li>
<li>List item</li>
<li>List item</li>
</ul>
<a href="#othercontent">Link to other content</a>
2009-01-31 05:54:48 +00:00
</div>
</div>
</div><!-- End demo -->
<div class="demo-description">
<p>Setting <code>autoHeight: false</code> allows to accordion panels to keep their native height.</p>
<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>
2009-01-31 05:54:48 +00:00
</div><!-- End demo-description -->
</body>
</html>