mirror of
https://github.com/twbs/bootstrap.git
synced 2024-12-01 13:24:25 +01:00
Add getInstance method in the docs for tooltip (#31636)
Co-authored-by: XhmikosR <xhmikosr@gmail.com>
This commit is contained in:
parent
65d130fbd8
commit
94c0f12329
@ -358,6 +358,15 @@ Updates the position of an element's tooltip.
|
||||
|
||||
{{< highlight js >}}tooltip.update(){{< /highlight >}}
|
||||
|
||||
#### getInstance
|
||||
|
||||
*Static* method which allows you to get the tooltip instance associated with a DOM element
|
||||
|
||||
{{< highlight js >}}
|
||||
var exampleTriggerEl = document.getElementById('example')
|
||||
var tooltip = bootstrap.Tooltip.getInstance(exampleTriggerEl) // Returns a Bootstrap tooltip instance
|
||||
{{< /highlight >}}
|
||||
|
||||
### Events
|
||||
|
||||
<table class="table">
|
||||
|
Loading…
Reference in New Issue
Block a user