aboutsummaryrefslogtreecommitdiffstats
path: root/ui/ui.accordion.js
diff options
context:
space:
mode:
authorScott González <scott.gonzalez@gmail.com>2009-02-02 02:29:31 +0000
committerScott González <scott.gonzalez@gmail.com>2009-02-02 02:29:31 +0000
commit94c16d6378b51f8f9d60768f902a0dbf0d6d5087 (patch)
tree1d2f0dd54652f37db96721e0da9226f865be21d4 /ui/ui.accordion.js
parent43ebec65763a6cd62b1d5189af83a954bb54ea53 (diff)
downloadjquery-ui-94c16d6378b51f8f9d60768f902a0dbf0d6d5087.tar.gz
jquery-ui-94c16d6378b51f8f9d60768f902a0dbf0d6d5087.zip
Accordion: Fixed #3969: Deprecated alwaysOpen for collapsible option; fixed demos, tests, and using alwaysOpen on init.
Diffstat (limited to 'ui/ui.accordion.js')
-rw-r--r--ui/ui.accordion.js10
1 files changed, 9 insertions, 1 deletions
diff --git a/ui/ui.accordion.js b/ui/ui.accordion.js
index c9330f64c..de0ef00fd 100644
--- a/ui/ui.accordion.js
+++ b/ui/ui.accordion.js
@@ -19,6 +19,14 @@ $.widget("ui.accordion", {
var o = this.options, self = this;
this.running = 0;
+ // if the user set the alwaysOpen option on init
+ // then we need to set the collapsible option
+ // if they set both on init, collapsible will take priority
+ if (o.collapsible == $.ui.accordion.defaults.collapsible &&
+ o.alwaysOpen != $.ui.accordion.defaults.alwaysOpen) {
+ o.collapsible = !o.alwaysOpen;
+ }
+
if ( o.navigation ) {
var current = this.element.find("a").filter(o.navigationFilter);
if ( current.length ) {
@@ -377,9 +385,9 @@ $.extend($.ui.accordion, {
active: null,
autoHeight: true,
alwaysOpen: true, //deprecated, use collapsible
- collapsible: false,
animated: 'slide',
clearStyle: false,
+ collapsible: false,
event: "click",
fillSpace: false,
header: "> li > :first-child,> :not(li):even",