From 333af7d371ee56db24030786c3036f3198fd3016 Mon Sep 17 00:00:00 2001 From: Kyle Date: Sat, 26 Jul 2014 17:55:18 -0400 Subject: [PATCH] Add docs for how to change default JS plugin settings Closes #14250. --- docs/_includes/js/overview.html | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/docs/_includes/js/overview.html b/docs/_includes/js/overview.html index 3aaba09807..2a3c41a8b0 100644 --- a/docs/_includes/js/overview.html +++ b/docs/_includes/js/overview.html @@ -47,6 +47,12 @@ $('#myModal').modal('show') // initializes and invokes show immed

Each plugin also exposes its raw constructor on a Constructor property: $.fn.popover.Constructor. If you'd like to get a particular plugin instance, retrieve it directly from an element: $('[rel="popover"]').data('popover').

+

Default settings

+

You can change the default settings for a plugin by modifying the plugin's Constructor.DEFAULTS object:

+{% highlight js %} +$.fn.modal.Constructor.DEFAULTS.keyboard = false // changes default for the modal plugin's `keyboard` option to false +{% endhighlight %} +

No conflict

Sometimes it is necessary to use Bootstrap plugins with other UI frameworks. In these circumstances, namespace collisions can occasionally occur. If this happens, you may call .noConflict on the plugin you wish to revert the value of.

{% highlight js %}