From a7eb9c294a575b5471ddec45ae75e1d09f7ace4c Mon Sep 17 00:00:00 2001 From: fat Date: Fri, 7 Dec 2012 17:06:01 -0500 Subject: add noConflict functionality to all bootstrap plugins --- docs/javascript.html | 8 ++++++++ 1 file changed, 8 insertions(+) (limited to 'docs/javascript.html') diff --git a/docs/javascript.html b/docs/javascript.html index 030c60cc1..9d1aec49d 100644 --- a/docs/javascript.html +++ b/docs/javascript.html @@ -134,6 +134,14 @@ $("#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').

+

No Conflict

+

Sometimes it's neccessary to use bootstrap plugins with other ui frameworks. In these circumstances, occasionally namespace collisions can occur. If this happens, you may call .noCoflict on the plugin you wish to revert the value of.

+ +
+var bootstrapButton = $.fn.button.noConflict() // return $.fn.button to previously assigned value
+$.fn.bootstrapBtn = bootstrapButton            // give $().bootstrapBtn the bootstrap functionality
+
+

Events

Bootstrap provides custom events for most plugin's unique actions. Generally, these come in an infinitive and past participle form - where the infinitive (ex. show) is triggered at the start of an event, and its past participle form (ex. shown) is trigger on the completion of an action.

All infinitive events provide preventDefault functionality. This provides the ability to stop the execution of an action before it starts.

-- cgit v1.2.3