diff options
author | GeoSot <geo.sotis@gmail.com> | 2022-05-28 05:06:07 +0300 |
---|---|---|
committer | GitHub <noreply@github.com> | 2022-05-28 05:06:07 +0300 |
commit | 651dae6d0f3ae8b6c231125fd46d91c89bc914bc (patch) | |
tree | a606b30c4e97bb625d23b5eb0b2213f4c78966f9 /site/layouts | |
parent | 8b85267739e4bee63f13dfa14a94f94926b4fd7a (diff) |
Add some details on "javascript" page (#36363)
* docs: Add more details on "getting-started -> javascript" page & group jQuery stuff
* Update after feedback
* Rewrite some content
- Shorten copy here and there
- Reduce some callouts that are entire sections with h2 headings
- Re-arrange a couple things
Co-authored-by: Mark Otto <markdotto@gmail.com>
Co-authored-by: Mark Otto <markd.otto@gmail.com>
Diffstat (limited to 'site/layouts')
-rw-r--r-- | site/layouts/partials/js-data-attributes.md | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/site/layouts/partials/js-data-attributes.md b/site/layouts/partials/js-data-attributes.md index c188652f06..e99ff7112c 100644 --- a/site/layouts/partials/js-data-attributes.md +++ b/site/layouts/partials/js-data-attributes.md @@ -1,3 +1,3 @@ -Options can be passed via data attributes or JavaScript. For data attributes, append the option name to `data-bs-`, as in `data-bs-animation=""`. Make sure to change the case type of the option name from camelCase to kebab-case when passing the options via data attributes. For example, use `data-bs-custom-class="beautifier"` instead of `data-bs-customClass="beautifier"`. +As options can be passed via data attributes or JavaScript, you can append an option name to `data-bs-`, as in `data-bs-animation="{value}"`. Make sure to change the case type of the option name from "_camelCase_" to "_kebab-case_" when passing the options via data attributes. For example, use `data-bs-custom-class="beautifier"` instead of `data-bs-customClass="beautifier"`. 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}'`. |