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 From 3bd9a26c01d6740d0b3a7aaad94ac53df3920c8c Mon Sep 17 00:00:00 2001 From: Quy Ton Date: Sat, 8 Dec 2012 12:06:46 -0800 Subject: Apply code tag to data attribute on javascript page --- docs/javascript.html | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'docs/javascript.html') diff --git a/docs/javascript.html b/docs/javascript.html index 9d1aec49d..35327319a 100644 --- a/docs/javascript.html +++ b/docs/javascript.html @@ -1132,7 +1132,7 @@ $('#my-alert').bind('closed', function () {

Do more with buttons. Control button states or create groups of buttons for more components like toolbars.

Stateful

-

Add data-loading-text="Loading..." to use a loading state on a button.

+

Add data-loading-text="Loading..." to use a loading state on a button.

<button type="button" class="btn btn-primary" data-toggle="button">Single Toggle</button>

Checkbox

-

Add data-toggle="buttons-checkbox" for checkbox style toggling on btn-group.

+

Add data-toggle="buttons-checkbox" for checkbox style toggling on btn-group.

@@ -1165,7 +1165,7 @@ $('#my-alert').bind('closed', function () {

Radio

-

Add data-toggle="buttons-radio" for radio style toggling on btn-group.

+

Add data-toggle="buttons-radio" for radio style toggling on btn-group.

-- cgit v1.2.3