Created
May 30, 2011 03:56
-
-
Save meltzerj/998428 to your computer and use it in GitHub Desktop.
This file contains hidden or 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
var win = $(window); | |
// Full body scroll | |
var isResizing = false; | |
win.bind( | |
'resize', | |
function() | |
{ | |
if (!isResizing) { | |
isResizing = true; | |
var container = $('#full-page-container'); | |
// Temporarily make the container tiny so it doesn't influence the | |
// calculation of the size of the document | |
container.css( | |
{ | |
'width': 1, | |
'height': 1 | |
} | |
); | |
// Now make it the size of the window... | |
container.css( | |
{ | |
'width': win.width(), | |
'height': win.height() | |
} | |
); | |
isResizing = false; | |
container.jScrollPane( | |
{ | |
'showArrows': true | |
} | |
); | |
} | |
} | |
).trigger('resize'); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment