Skip to content

Commit

Permalink
Update site/layouts/partials/js-data-attributes.md
Browse files Browse the repository at this point in the history
Co-authored-by: Mark Otto <markd.otto@gmail.com>
  • Loading branch information
GeoSot and mdo committed Nov 17, 2022
1 parent 6d42f75 commit 4cea03f
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion site/layouts/partials/js-data-attributes.md
Expand Up @@ -2,4 +2,4 @@ As options can be passed via data attributes or JavaScript, you can append an op

As of Bootstrap 5.2.0, all components support an **experimental** reserved data attribute `data-bs-config` that can house simple component configuration as a JSON string. When an element has `data-bs-config='{"delay":0, "title":123}'` and `data-bs-title="456"` attributes, the final `title` value will be `456` and the separate data attributes will override values given on `data-bs-config`. In addition, existing data attributes are able to house JSON values like `data-bs-delay='{"show":0,"hide":150}'`.

<small>Note: The final configuration object, is the merged result of all given ways.The merging order is `data-bs-config`, `data-bs-`, `js object` where the latest given key-value overrides the others.</small>
The final configuration object is the merged result of all given ways. The merging order is `data-bs-config`, `data-bs-`, and `js object` where the latest given key-value overrides the others.

0 comments on commit 4cea03f

Please sign in to comment.