From 69b997c547ff2f693ae572105550aed4ffb5d9b6 Mon Sep 17 00:00:00 2001 From: "J. Eric Ellis" Date: Thu, 6 Apr 2017 10:21:59 -0400 Subject: [PATCH] Changes to better dovetail with current Foundation design patterns. Changed method of detecting disabled per https://github.com/zurb/foundation-sites/pull/9812#discussion_r109806300 Altered docs to reflect current functionality of disable accordions, documented below. If an accordion is disabled, all motion methods (`up`, `down`, `toggle`) get eaten, with the exception of `down` when combined with `firstTime`. Added a `console.info()` message to indicate when these methods are attempted on a disabled accordion. --- docs/pages/accordion.md | 8 ++++++-- js/foundation.accordion.js | 9 ++++++--- 2 files changed, 12 insertions(+), 5 deletions(-) diff --git a/docs/pages/accordion.md b/docs/pages/accordion.md index 19980ca27..e7024d694 100644 --- a/docs/pages/accordion.md +++ b/docs/pages/accordion.md @@ -131,13 +131,17 @@ By default, at least one pane in an accordion must be open. This can be changed ### Disabled -There may be times where you want to disable pane switching on an accordion. This can be accomplished by setting the disabled attribute. +There may be times where you want to disable pane switching on an accordion. This can be accomplished by setting the `disabled` option. + +
+

The `disabled` option disables all up, down, and toggle methods of an accordion. If you wish to manipulate a disabled accordion with JavaScript, you will need to remove the `disabled` option from the accordion.

+
```html_example