aboutsummaryrefslogtreecommitdiff
path: root/site/docs
diff options
context:
space:
mode:
authorJason Golieb <[email protected]>2019-01-28 22:55:21 +0200
committerXhmikosR <[email protected]>2019-02-05 10:24:49 +0200
commit88a34aacbee09417252c804f7cded926a496904a (patch)
treed604f307ea420b376b4a41f8f32052faaab7804c /site/docs
parent1accd37aa07fa15485a85a9e2ff316aaba51333e (diff)
downloadbootstrap-88a34aacbee09417252c804f7cded926a496904a.tar.xz
bootstrap-88a34aacbee09417252c804f7cded926a496904a.zip
Add support for tooltip offset option to be a function.
Diffstat (limited to 'site/docs')
-rw-r--r--site/docs/4.2/components/tooltips.md8
1 files changed, 6 insertions, 2 deletions
diff --git a/site/docs/4.2/components/tooltips.md b/site/docs/4.2/components/tooltips.md
index e49db5634..0a6be4758 100644
--- a/site/docs/4.2/components/tooltips.md
+++ b/site/docs/4.2/components/tooltips.md
@@ -234,9 +234,13 @@ Options can be passed via data attributes or JavaScript. For data attributes, ap
</tr>
<tr>
<td>offset</td>
- <td>number | string</td>
+ <td>number | string | function</td>
<td>0</td>
- <td>Offset of the tooltip relative to its target. For more information refer to Popper.js's <a href="https://popper.js.org/popper-documentation.html#modifiers..offset.offset">offset docs</a>.</td>
+ <td>
+ <p>Offset of the tooltip relative to its target.</p>
+ <p>When a function is used to determine the offset, it is called with an object containing the offset data as its first argument. The function must return an object with the same structure. The triggering element DOM node is passed as the second argument.</p>
+ <p>For more information refer to Popper.js's <a href="https://popper.js.org/popper-documentation.html#modifiers..offset.offset">offset docs</a>.</p>
+ </td>
</tr>
<tr>
<td>fallbackPlacement</td>