mirror of
https://github.com/tenrok/bootstrap.git
synced 2026-06-08 17:22:31 +03:00
Add code to method/property tables (#31130)
Co-authored-by: XhmikosR <xhmikosr@gmail.com>
This commit is contained in:
@@ -170,23 +170,23 @@ Note that for security reasons the `sanitize`, `sanitizeFn`, and `allowList` opt
|
||||
</thead>
|
||||
<tbody>
|
||||
<tr>
|
||||
<td>animation</td>
|
||||
<td><code>animation</code></td>
|
||||
<td>boolean</td>
|
||||
<td>true</td>
|
||||
<td><code>true</code></td>
|
||||
<td>Apply a CSS fade transition to the tooltip</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>container</td>
|
||||
<td><code>container</code></td>
|
||||
<td>string | element | false</td>
|
||||
<td>false</td>
|
||||
<td><code>false</code></td>
|
||||
<td>
|
||||
<p>Appends the tooltip to a specific element. Example: <code>container: 'body'</code>. This option is particularly useful in that it allows you to position the tooltip in the flow of the document near the triggering element - which will prevent the tooltip from floating away from the triggering element during a window resize.</p>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>delay</td>
|
||||
<td><code>delay</code></td>
|
||||
<td>number | object</td>
|
||||
<td>0</td>
|
||||
<td><code>0</code></td>
|
||||
<td>
|
||||
<p>Delay showing and hiding the tooltip (ms) - does not apply to manual trigger type</p>
|
||||
<p>If a number is supplied, delay is applied to both hide/show</p>
|
||||
@@ -194,9 +194,9 @@ Note that for security reasons the `sanitize`, `sanitizeFn`, and `allowList` opt
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>html</td>
|
||||
<td><code>html</code></td>
|
||||
<td>boolean</td>
|
||||
<td>false</td>
|
||||
<td><code>false</code></td>
|
||||
<td>
|
||||
<p>Allow HTML in the tooltip.</p>
|
||||
<p>If true, HTML tags in the tooltip's <code>title</code> will be rendered in the tooltip. If false, <code>innerText</code> property will be used to insert content into the DOM.</p>
|
||||
@@ -204,22 +204,22 @@ Note that for security reasons the `sanitize`, `sanitizeFn`, and `allowList` opt
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>placement</td>
|
||||
<td><code>placement</code></td>
|
||||
<td>string | function</td>
|
||||
<td>'top'</td>
|
||||
<td><code>'top'</code></td>
|
||||
<td>
|
||||
<p>How to position the tooltip - auto | top | bottom | left | right.<br>When <code>auto</code> is specified, it will dynamically reorient the tooltip.</p>
|
||||
<p>When a function is used to determine the placement, it is called with the tooltip DOM node as its first argument and the triggering element DOM node as its second. The <code>this</code> context is set to the tooltip instance.</p>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>selector</td>
|
||||
<td><code>selector</code></td>
|
||||
<td>string | false</td>
|
||||
<td>false</td>
|
||||
<td><code>false</code></td>
|
||||
<td>If a selector is provided, tooltip objects will be delegated to the specified targets. In practice, this is used to also apply tooltips to dynamically added DOM elements (<code>jQuery.on</code> support). See <a href="{{< param repo >}}/issues/4215">this</a> and <a href="https://codepen.io/Johann-S/pen/djJYPb">an informative example</a>.</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>template</td>
|
||||
<td><code>template</code></td>
|
||||
<td>string</td>
|
||||
<td><code>'<div class="tooltip" role="tooltip"><div class="tooltip-arrow"></div><div class="tooltip-inner"></div></div>'</code></td>
|
||||
<td>
|
||||
@@ -230,18 +230,18 @@ Note that for security reasons the `sanitize`, `sanitizeFn`, and `allowList` opt
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>title</td>
|
||||
<td><code>title</code></td>
|
||||
<td>string | element | function</td>
|
||||
<td>''</td>
|
||||
<td><code>''</code></td>
|
||||
<td>
|
||||
<p>Default title value if <code>title</code> attribute isn't present.</p>
|
||||
<p>If a function is given, it will be called with its <code>this</code> reference set to the element that the tooltip is attached to.</p>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>trigger</td>
|
||||
<td><code>trigger</code></td>
|
||||
<td>string</td>
|
||||
<td>'hover focus'</td>
|
||||
<td><code>'hover focus'</code></td>
|
||||
<td>
|
||||
<p>How tooltip is triggered - click | hover | focus | manual. You may pass multiple triggers; separate them with a space.</p>
|
||||
<p><code>'manual'</code> indicates that the tooltip will be triggered programmatically via the <code>.tooltip('show')</code>, <code>.tooltip('hide')</code> and <code>.tooltip('toggle')</code> methods; this value cannot be combined with any other trigger.</p>
|
||||
@@ -249,9 +249,9 @@ Note that for security reasons the `sanitize`, `sanitizeFn`, and `allowList` opt
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>offset</td>
|
||||
<td><code>offset</code></td>
|
||||
<td>number | string | function</td>
|
||||
<td>0</td>
|
||||
<td><code>0</code></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>
|
||||
@@ -259,40 +259,40 @@ Note that for security reasons the `sanitize`, `sanitizeFn`, and `allowList` opt
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>fallbackPlacement</td>
|
||||
<td><code>fallbackPlacement</code></td>
|
||||
<td>string | array</td>
|
||||
<td>'flip'</td>
|
||||
<td><code>'flip'</code></td>
|
||||
<td>Allow to specify which position Popper will use on fallback. For more information refer to
|
||||
Popper.js's <a href="https://popper.js.org/docs/v1/#modifiers..flip.behavior">behavior docs</a></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>boundary</td>
|
||||
<td><code>boundary</code></td>
|
||||
<td>string | element</td>
|
||||
<td>'scrollParent'</td>
|
||||
<td><code>'scrollParent'</code></td>
|
||||
<td>Overflow constraint boundary of the tooltip. Accepts the values of <code>'viewport'</code>, <code>'window'</code>, <code>'scrollParent'</code>, or an HTMLElement reference (JavaScript only). For more information refer to Popper.js's <a href="https://popper.js.org/docs/v1/#modifiers..preventOverflow.boundariesElement">preventOverflow docs</a>.</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>sanitize</td>
|
||||
<td><code>sanitize</code></td>
|
||||
<td>boolean</td>
|
||||
<td>true</td>
|
||||
<td><code>true</code></td>
|
||||
<td>Enable or disable the sanitization. If activated <code>'template'</code> and <code>'title'</code> options will be sanitized.</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>allowList</td>
|
||||
<td><code>allowList</code></td>
|
||||
<td>object</td>
|
||||
<td><a href="{{< docsref "/getting-started/javascript#sanitizer" >}}">Default value</a></td>
|
||||
<td>Object which contains allowed attributes and tags</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>sanitizeFn</td>
|
||||
<td><code>sanitizeFn</code></td>
|
||||
<td>null | function</td>
|
||||
<td>null</td>
|
||||
<td><code>null</code></td>
|
||||
<td>Here you can supply your own sanitize function. This can be useful if you prefer to use a dedicated library to perform sanitization.</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>popperConfig</td>
|
||||
<td><code>popperConfig</code></td>
|
||||
<td>null | object</td>
|
||||
<td>null</td>
|
||||
<td><code>null</code></td>
|
||||
<td>To change Bootstrap's default Popper.js config, see <a href="https://popper.js.org/docs/v1/#Popper.Defaults">Popper.js's configuration</a></td>
|
||||
</tr>
|
||||
</tbody>
|
||||
@@ -369,23 +369,23 @@ Updates the position of an element's tooltip.
|
||||
</thead>
|
||||
<tbody>
|
||||
<tr>
|
||||
<td>show.bs.tooltip</td>
|
||||
<td><code>show.bs.tooltip</code></td>
|
||||
<td>This event fires immediately when the <code>show</code> instance method is called.</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>shown.bs.tooltip</td>
|
||||
<td><code>shown.bs.tooltip</code></td>
|
||||
<td>This event is fired when the tooltip has been made visible to the user (will wait for CSS transitions to complete).</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>hide.bs.tooltip</td>
|
||||
<td><code>hide.bs.tooltip</code></td>
|
||||
<td>This event is fired immediately when the <code>hide</code> instance method has been called.</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>hidden.bs.tooltip</td>
|
||||
<td><code>hidden.bs.tooltip</code></td>
|
||||
<td>This event is fired when the tooltip has finished being hidden from the user (will wait for CSS transitions to complete).</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>inserted.bs.tooltip</td>
|
||||
<td><code>inserted.bs.tooltip</code></td>
|
||||
<td>This event is fired after the <code>show.bs.tooltip</code> event when the tooltip template has been added to the DOM.</td>
|
||||
</tr>
|
||||
</tbody>
|
||||
|
||||
Reference in New Issue
Block a user