Skip to content
Permalink
Browse files

demos/accordion/default.html: highlighted note about when not to use …

…accordion
  • Loading branch information
rdworth committed Dec 31, 2008
1 parent 177c546 commit 8ed5c40bfb055696c02c4bfa1da2b223370e0761
Showing with 11 additions and 6 deletions.
  1. +10 −6 demos/accordion/default.html
  2. +1 −0 demos/index.html
@@ -59,13 +59,17 @@ <h3><a href="#">Section 4</a></h3>

<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>

<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>

<pre>jQuery(document).ready(function(){
$(".accordion .head").click(function() {
$(this).next().toggle();
}).next().hide();
<div style="padding: 0pt 0.7em; margin-top: 20px;" class="ui-state-highlight ui-corner-all">
<p>
<span style="float: left; margin-right: 0.3em;" class="ui-icon ui-icon-info"></span>
<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:
<pre class="ui-widget-content">jQuery(document).ready(function(){
$(".accordion .head").click(function() {
$(this).next().toggle();
}).next().hide();
});</pre>
</p>
</div>

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

@@ -3,6 +3,7 @@
<html lang="en">
<head>
<title>jQuery UI Demos</title>
<link type="text/css" href="../themes/default/ui.all.css" rel="stylesheet" />
<link type="text/css" href="demos.css" rel="stylesheet" />
<script type="text/javascript" src="../jquery-1.2.6.js"></script>
<script type="text/javascript" src="../ui/ui.core.js"></script>

0 comments on commit 8ed5c40

Please sign in to comment.
You can’t perform that action at this time.