1
0
mirror of https://github.com/twbs/bootstrap.git synced 2025-09-01 17:32:41 +02:00

Add support for tooltip offset option to be a function.

This commit is contained in:
Jason Golieb
2019-01-28 22:55:21 +02:00
committed by XhmikosR
parent 1accd37aa0
commit 88a34aacbe
3 changed files with 55 additions and 6 deletions

View File

@@ -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>