aboutsummaryrefslogtreecommitdiff
path: root/js/bootstrap-collapse.js
diff options
context:
space:
mode:
authorMark Otto <[email protected]>2011-12-21 18:39:02 -0600
committerMark Otto <[email protected]>2011-12-21 18:39:02 -0600
commit9fb380151d477f1741b7609ade7a9e7fd5450b2c (patch)
treea749f2b6917c09770af1586ae9f83e46115de7eb /js/bootstrap-collapse.js
parent12a0d69454a2831031035d19237d36d38bb2c2a9 (diff)
parenta5a98a8a984512011dac1216b432b86c6eff96a4 (diff)
downloadbootstrap-9fb380151d477f1741b7609ade7a9e7fd5450b2c.tar.xz
bootstrap-9fb380151d477f1741b7609ade7a9e7fd5450b2c.zip
Merge branch '2.0-wip' of github.com:twitter/bootstrap into 2.0-wip
Conflicts: bootstrap.css docs/javascript.html
Diffstat (limited to 'js/bootstrap-collapse.js')
-rw-r--r--js/bootstrap-collapse.js16
1 files changed, 8 insertions, 8 deletions
diff --git a/js/bootstrap-collapse.js b/js/bootstrap-collapse.js
index f56f6c705..313c0abca 100644
--- a/js/bootstrap-collapse.js
+++ b/js/bootstrap-collapse.js
@@ -23,13 +23,13 @@
var Collapse = function ( element, options ) {
this.$element = $(element)
- this.settings = $.extend({}, $.fn.collapse.defaults, options)
+ this.options = $.extend({}, $.fn.collapse.defaults, options)
- if (this.settings["parent"]) {
- this.$parent = $(this.settings["parent"])
+ if (this.options["parent"]) {
+ this.$parent = $(this.options["parent"])
}
- this.settings.toggle && this.toggle()
+ this.options.toggle && this.toggle()
}
Collapse.prototype = {
@@ -116,20 +116,20 @@
toggle: true
}
- $.fn.collapse.Collapse = Collapse
+ $.fn.collapse.Constructor = Collapse
/* COLLAPSIBLE DATA-API
* ==================== */
$(function () {
- $('body').delegate('[data-toggle=collapse]', 'click.collapse.data-api', function ( e ) {
+ $('body').on('click.collapse.data-api', '[data-toggle=collapse]', function ( e ) {
var $this = $(this)
, target = $this.attr('data-target') || $this.attr('href')
, option = $(target).data('collapse') ? 'toggle' : $this.data()
- e.preventDefault()
+ e.preventDefault()
$(target).collapse(option)
})
})
-})( window.jQuery || window.ender ) \ No newline at end of file
+})( window.jQuery ) \ No newline at end of file