1
0
mirror of https://github.com/twbs/bootstrap.git synced 2025-08-23 05:33:02 +02:00

Add a template factory helper to handle all template cases (#34519)

Co-authored-by: XhmikosR <xhmikosr@gmail.com>
This commit is contained in:
GeoSot
2021-11-25 19:14:02 +02:00
committed by GitHub
parent fa33e83f25
commit 94a596fbcb
10 changed files with 606 additions and 131 deletions

View File

@@ -368,6 +368,21 @@ Removes the ability for an element's popover to be shown. The popover will only
myPopover.disable()
```
#### setContent
Gives a way to change the popover's content after its initialization.
```js
myPopover.setContent({
'.popover-header': 'another title',
'.popover-body': 'another content'
})
```
{{< callout info >}}
The `setContent` method accepts an `object` argument, where each property-key is a valid `string` selector within the popover template, and each related property-value can be `string` | `element` | `function` | `null`
{{< /callout >}}
#### toggleEnabled
Toggles the ability for an element's popover to be shown or hidden.

View File

@@ -392,6 +392,17 @@ Removes the ability for an element's tooltip to be shown. The tooltip will only
tooltip.disable()
```
#### setContent
Gives a way to change the tooltip's content after its initialization.
```js
tooltip.setContent({ '.tooltip-inner': 'another title' })
```
{{< callout info >}}
The `setContent` method accepts an `object` argument, where each property-key is a valid `string` selector within the popover template, and each related property-value can be `string` | `element` | `function` | `null`
{{< /callout >}}
#### toggleEnabled
Toggles the ability for an element's tooltip to be shown or hidden.