From: Jacob Thornton Date: Sun, 15 Apr 2012 23:15:32 +0000 (-0700) Subject: fixes #2941 + whitespace in collapse X-Git-Tag: v2.0.3~5^2~22^2~4^2 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=0b8042656fc52600e18fb1c7f54dbbe8a284e737;p=thirdparty%2Fbootstrap.git fixes #2941 + whitespace in collapse --- diff --git a/docs/assets/js/bootstrap-alert.js b/docs/assets/js/bootstrap-alert.js index 167a57f841..56174955b9 100644 --- a/docs/assets/js/bootstrap-alert.js +++ b/docs/assets/js/bootstrap-alert.js @@ -27,7 +27,7 @@ * ====================== */ var dismiss = '[data-dismiss="alert"]' - , Alert = function ( el ) { + , Alert = function (el) { $(el).on('click', dismiss, this.close) } @@ -68,7 +68,7 @@ /* ALERT PLUGIN DEFINITION * ======================= */ - $.fn.alert = function ( option ) { + $.fn.alert = function (option) { return this.each(function () { var $this = $(this) , data = $this.data('alert') diff --git a/docs/assets/js/bootstrap-collapse.js b/docs/assets/js/bootstrap-collapse.js index 30e139cf89..41e097df31 100644 --- a/docs/assets/js/bootstrap-collapse.js +++ b/docs/assets/js/bootstrap-collapse.js @@ -60,6 +60,7 @@ if (actives && actives.length) { hasData = actives.data('collapse') + if (hasData && hasData.transitioning) return actives.collapse('hide') hasData || actives.data('collapse', null) } diff --git a/js/bootstrap-alert.js b/js/bootstrap-alert.js index 167a57f841..56174955b9 100644 --- a/js/bootstrap-alert.js +++ b/js/bootstrap-alert.js @@ -27,7 +27,7 @@ * ====================== */ var dismiss = '[data-dismiss="alert"]' - , Alert = function ( el ) { + , Alert = function (el) { $(el).on('click', dismiss, this.close) } @@ -68,7 +68,7 @@ /* ALERT PLUGIN DEFINITION * ======================= */ - $.fn.alert = function ( option ) { + $.fn.alert = function (option) { return this.each(function () { var $this = $(this) , data = $this.data('alert') diff --git a/js/bootstrap-collapse.js b/js/bootstrap-collapse.js index 30e139cf89..41e097df31 100644 --- a/js/bootstrap-collapse.js +++ b/js/bootstrap-collapse.js @@ -60,6 +60,7 @@ if (actives && actives.length) { hasData = actives.data('collapse') + if (hasData && hasData.transitioning) return actives.collapse('hide') hasData || actives.data('collapse', null) }