diff --git a/jquery.modal.js b/jquery.modal.js index 2c3bcce..6b662b6 100644 --- a/jquery.modal.js +++ b/jquery.modal.js @@ -113,7 +113,8 @@ block: function() { this.$elm.trigger($.modal.BEFORE_BLOCK, [this._ctx()]); - this.$body.css('overflow','hidden'); + if (!this.options.bodyScroll) + this.$body.css('overflow','hidden'); this.$blocker = $('
').appendTo(this.$body); selectCurrent(); if(this.options.doFade) { @@ -130,7 +131,7 @@ this.$blocker.remove(); this.$blocker = null; selectCurrent(); - if (!$.modal.isActive()) + if (!$.modal.isActive() && !this.options.bodyScroll) this.$body.css('overflow',''); } }, @@ -211,7 +212,8 @@ showSpinner: true, showClose: true, fadeDuration: null, // Number of milliseconds the fade animation takes. - fadeDelay: 1.0 // Point during the overlay's fade-in that the modal begins to fade in (.5 = 50%, 1.5 = 150%, etc.) + fadeDelay: 1.0, // Point during the overlay's fade-in that the modal begins to fade in (.5 = 50%, 1.5 = 150%, etc.) + bodyScroll: false // Keeps body overflow visible, body scrolling enabled, is set to true. Default is false. }; // Event constants