vendor/assets/javascripts/twitter/bootstrap-collapse.js in sass-twitter-bootstrap-2.2.2.1 vs vendor/assets/javascripts/twitter/bootstrap-collapse.js in sass-twitter-bootstrap-2.3.0

- old
+ new

@@ -1,7 +1,7 @@ /* ============================================================= - * bootstrap-collapse.js v2.2.2 + * bootstrap-collapse.js v2.3.0 * http://twitter.github.com/bootstrap/javascript.html#collapse * ============================================================= * Copyright 2012 Twitter, Inc. * * Licensed under the Apache License, Version 2.0 (the "License"); @@ -50,11 +50,11 @@ var dimension , scroll , actives , hasData - if (this.transitioning) return + if (this.transitioning || this.$element.hasClass('in')) return dimension = this.dimension() scroll = $.camelCase(['scroll', dimension].join('-')) actives = this.$parent && this.$parent.find('> .accordion-group > .in') @@ -70,11 +70,11 @@ $.support.transition && this.$element[dimension](this.$element[0][scroll]) } , hide: function () { var dimension - if (this.transitioning) return + if (this.transitioning || !this.$element.hasClass('in')) return dimension = this.dimension() this.reset(this.$element[dimension]()) this.transition('removeClass', $.Event('hide'), 'hidden') this.$element[dimension](0) } @@ -127,10 +127,10 @@ $.fn.collapse = function (option) { return this.each(function () { var $this = $(this) , data = $this.data('collapse') - , options = typeof option == 'object' && option + , options = $.extend({}, $.fn.collapse.defaults, $this.data(), typeof option == 'object' && option) if (!data) $this.data('collapse', (data = new Collapse(this, options))) if (typeof option == 'string') data[option]() }) } \ No newline at end of file