0
0
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:
Rohit Sharma 2020-09-15 10:58:08 +05:30 committed by GitHub
parent 65d130fbd8
commit 94c0f12329
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

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