1
0
mirror of https://github.com/twbs/bootstrap.git synced 2025-09-25 21:09:06 +02:00

giant refactor - all spec passing again...

This commit is contained in:
Jacob Thornton
2011-12-20 18:02:47 -08:00
parent 7df0d1c7d1
commit 1ef5fa7d6b
27 changed files with 9618 additions and 390 deletions

View File

@@ -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 = {
@@ -123,13 +123,13 @@
* ==================== */
$(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 )
})( window.jQuery )