]> git.ipfire.org Git - thirdparty/foundation/foundation-sites.git/commitdiff
In JavaScript docs, correct example data attribute, and remove references to data...
authorGeoff Kimball <geoff@zurb.com>
Mon, 23 Nov 2015 23:05:43 +0000 (15:05 -0800)
committerGeoff Kimball <geoff@zurb.com>
Mon, 23 Nov 2015 23:05:43 +0000 (15:05 -0800)
docs/pages/javascript.md

index ca2c4c875e153d3d7bd5751008acb497517cce9e..7cc6dbb261817bf4f861c86e71073b9f2805c488 100644 (file)
@@ -75,16 +75,10 @@ Foundation.Accordion.defaults.multiExpand = true;
 
 An individual instance of a plugin can also have different settings. These can be set in the HTML or in JavaScript.
 
-In the HTML, each setting can be defined as an individual data attribute.
+In the HTML, each setting can be defined as an individual data attribute. Note that camelCased options are converted to hyphenated words. In the below example, `multiExpand` becomes `data-multi-expand`.
 
 ```html
-<div data-accordion data-slidespeed="500" data-multiexpand="true"></div>
-```
-
-If that's too many attributes for you, they can be combined into one called `data-options`. Write the options as JavaScript-style key-value pairs, separated by semicolons.
-
-```html
-<div data-accordion data-options="slideSpeed: 500; multiExpand: true"></div>
+<div data-accordion data-slidespeed="500" data-multi-expand="true"></div>
 ```
 
 ---