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:
@@ -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.
|
||||
|
@@ -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.
|
||||
|
Reference in New Issue
Block a user