1
0
mirror of https://github.com/twbs/bootstrap.git synced 2025-08-22 05:03:16 +02:00

try using tricker opacity thingy

This commit is contained in:
Jacob Thornton
2011-08-28 17:40:25 -07:00
parent d8d6e40097
commit 9059a72bf8
4 changed files with 16 additions and 10 deletions

View File

@@ -107,13 +107,10 @@
, animate = this.$element.hasClass('fade') ? 'fade' : ''
if ( this.isOpen && this.settings.backdrop ) {
this.$backdrop = $('<div class="modal-backdrop ' + animate + '" />')
.click(function () { that.close() })
.appendTo(document.body)
$('body').delegate('.modal-backdrop', 'click.modal.backdrop', function () {
that.close()
})
} else if ( !this.isOpen && this.$backdrop ) {
this.$backdrop.removeClass('in')
$('body').undelegate('click.modal.backdrop')
function removeElement() {
that.$backdrop.remove()