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:
authorfat <jacobthornton@gmail.com>2012-12-08 02:06:01 +0400
committerfat <jacobthornton@gmail.com>2012-12-08 02:06:01 +0400
commita7eb9c294a575b5471ddec45ae75e1d09f7ace4c (patch)
treee55d0f54282e2f9f41c7ba87254e2ab9928f10ee /js/bootstrap-collapse.js
parent1c5b8e967e2b421503bc010d4ed3b79406ea5b7b (diff)
add noConflict functionality to all bootstrap plugins
Diffstat (limited to 'js/bootstrap-collapse.js')
-rw-r--r--js/bootstrap-collapse.js17
1 files changed, 14 insertions, 3 deletions
diff --git a/js/bootstrap-collapse.js b/js/bootstrap-collapse.js
index a09ce10048..6ac0191a50 100644
--- a/js/bootstrap-collapse.js
+++ b/js/bootstrap-collapse.js
@@ -120,8 +120,10 @@
}
- /* COLLAPSIBLE PLUGIN DEFINITION
- * ============================== */
+ /* COLLAPSE PLUGIN DEFINITION
+ * ========================== */
+
+ var old = $.fn.collapse
$.fn.collapse = function (option) {
return this.each(function () {
@@ -140,9 +142,18 @@
$.fn.collapse.Constructor = Collapse
- /* COLLAPSIBLE DATA-API
+ /* COLLAPSE NO CONFLICT
* ==================== */
+ $.fn.collapse.noConflict = function () {
+ $.fn.collapse = old
+ return this
+ }
+
+
+ /* COLLAPSE DATA-API
+ * ================= */
+
$(document).on('click.collapse.data-api', '[data-toggle=collapse]', function (e) {
var $this = $(this), href
, target = $this.attr('data-target')