From 235246d6fcc7947d04555205a5f8a242eb3f6b97 Mon Sep 17 00:00:00 2001 From: Jacob Thornton Date: Sat, 10 Sep 2011 18:26:37 -0700 Subject: not feeling the slide in --- js/bootstrap-modal.js | 30 ++++++++++-------------------- 1 file changed, 10 insertions(+), 20 deletions(-) (limited to 'js/bootstrap-modal.js') diff --git a/js/bootstrap-modal.js b/js/bootstrap-modal.js index 81f265710d..4843d2b727 100644 --- a/js/bootstrap-modal.js +++ b/js/bootstrap-modal.js @@ -59,17 +59,16 @@ this.isShown = true _.escape.call(this) - _.backdrop.call(this, function () { + _.backdrop.call(this) - that.$element - .appendTo(document.body) - .show() + this.$element + .appendTo(document.body) + .show() - setTimeout(function () { - that.$element.addClass('in').trigger('modal:shown') - }, 1) - - }) + setTimeout(function () { + that.$element.addClass('in').trigger('modal:shown') + that.$backdrop && that.$backdrop.addClass('in') + }, 1) return this } @@ -82,12 +81,11 @@ this.isShown = false _.escape.call(this) + _.backdrop.call(this) this.$element.removeClass('in') function removeElement () { - _.backdrop.call(that) - that.$element .detach() .trigger('modal:hidden') @@ -108,21 +106,13 @@ var _ = { - backdrop: function ( callback ) { + backdrop: function () { var that = this , animate = this.$element.hasClass('fade') ? 'fade' : '' if ( this.isShown && this.settings.backdrop ) { this.$backdrop = $('