Skip to content

Commit 8ed5c40

Browse files
committed
demos/accordion/default.html: highlighted note about when not to use accordion
1 parent 177c546 commit 8ed5c40

2 files changed

Lines changed: 11 additions & 6 deletions

File tree

demos/accordion/default.html

Lines changed: 10 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -59,13 +59,17 @@ <h3><a href="#">Section 4</a></h3>
5959

6060
<p>This is a default accordion which is an expandable/collapsible content pane that is useful for situations when content must be displayed within limited space and can be broken into logical sections, much like tabs. Sections open when clicked by default. The HTML code is a series of headers (H3) and content divs so the content is still usable without Javascript.</p>
6161

62-
<p>If you are looking for a widget that allows more than one content panel to be open, don't use this plugin. You can achieve this effect with a few lines of jQuery instead, like this:</p>
63-
64-
<pre>jQuery(document).ready(function(){
65-
$(".accordion .head").click(function() {
66-
$(this).next().toggle();
67-
}).next().hide();
62+
<div style="padding: 0pt 0.7em; margin-top: 20px;" class="ui-state-highlight ui-corner-all">
63+
<p>
64+
<span style="float: left; margin-right: 0.3em;" class="ui-icon ui-icon-info"></span>
65+
<strong>Note:</strong> If you are looking for a widget that allows more than one content panel to be open, don't use this plugin. You can achieve this effect with a few lines of jQuery instead, like this:
66+
<pre class="ui-widget-content">jQuery(document).ready(function(){
67+
$(".accordion .head").click(function() {
68+
$(this).next().toggle();
69+
}).next().hide();
6870
});</pre>
71+
</p>
72+
</div>
6973

7074
</div><!-- End demo-description -->
7175

demos/index.html

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@
33
<html lang="en">
44
<head>
55
<title>jQuery UI Demos</title>
6+
<link type="text/css" href="../themes/default/ui.all.css" rel="stylesheet" />
67
<link type="text/css" href="demos.css" rel="stylesheet" />
78
<script type="text/javascript" src="../jquery-1.2.6.js"></script>
89
<script type="text/javascript" src="../ui/ui.core.js"></script>

0 commit comments

Comments
 (0)