Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/twbs/bootstrap.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGeoSot <geo.sotis@gmail.com>2021-06-03 18:53:27 +0300
committerGitHub <noreply@github.com>2021-06-03 18:53:27 +0300
commitc98657b8303150bfda3bdea750055b83a29b27a3 (patch)
tree6f7b347461e3fdd380f0d4e990440e6fc427af61 /site/content/docs/5.0/components/buttons.md
parent4a5029ea29ac75243dfec68153051292fc70f5cf (diff)
Add `getOrCreateInstance` method in base-component (#33276)
Co-authored-by: Rohit Sharma <rohit2sharma95@gmail.com> Co-authored-by: XhmikosR <xhmikosr@gmail.com>
Diffstat (limited to 'site/content/docs/5.0/components/buttons.md')
-rw-r--r--site/content/docs/5.0/components/buttons.md17
1 files changed, 17 insertions, 0 deletions
diff --git a/site/content/docs/5.0/components/buttons.md b/site/content/docs/5.0/components/buttons.md
index 063bae1c41..d62d6e2b65 100644
--- a/site/content/docs/5.0/components/buttons.md
+++ b/site/content/docs/5.0/components/buttons.md
@@ -193,6 +193,23 @@ var bsButton = new bootstrap.Button(button)
Destroys an element's button. (Removes stored data on the DOM element)
</td>
</tr>
+ <tr>
+ <td>
+ <code>getInstance</code>
+ </td>
+ <td>
+ Static method which allows you to get the button instance associated to a DOM element, you can use it like this: <code>bootstrap.Button.getInstance(element)</code>
+ </td>
+ </tr>
+ <tr>
+ <td>
+ <code>getOrCreateInstance</code>
+ </td>
+ <td>
+ Static method which returns a button instance associated to a DOM element or create a new one in case it wasn't initialised.
+ You can use it like this: <code>bootstrap.Button.getOrCreateInstance(element)</code>
+ </td>
+ </tr>
</tbody>
</table>