Created
October 2, 2015 11:09
-
-
Save tarunranka/a128f3ae627a5591b490 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
disableScrolling: function() { | |
var that= this; | |
var body = $('body'); | |
var oWidth = body.outerWidth(true); | |
body.addClass('themodal-lock'); | |
var sbWidth = body.outerWidth(true) - oWidth; | |
if (that.isIE()) { | |
that.ieBodyTopMargin = body.css('margin-top'); | |
body.css('margin-top', 0); | |
} | |
if (sbWidth != 0) { | |
var tags = $('html, body'); | |
tags.each(function () { | |
var $this = $(this); | |
that.oMargin[$this.prop('tagName').toLowerCase()] = parseInt($this.css('margin-right')); | |
}); | |
$('html').css('margin-right', that.oMargin['html'] + sbWidth); | |
//$('.popup-bck').css('left', 0 - sbWidth); | |
} | |
}, | |
enableScrolling: function() { | |
var that= this; | |
if (that.isIE()) { | |
$('body').css('margin-top', that.ieBodyTopMargin); | |
} | |
var body = $('body'); | |
var oWidth = body.outerWidth(true); | |
body.removeClass('themodal-lock'); | |
var sbWidth = body.outerWidth(true) - oWidth; | |
if (sbWidth != 0) { | |
$('html, body').each(function () { | |
var $this = $(this); | |
$this.css('margin-right', that.oMargin[$this.prop('tagName').toLowerCase()]) | |
}); | |
} | |
}, |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment