Skip to content

Instantly share code, notes, and snippets.

@meltzerj
Created May 30, 2011 03:56
Show Gist options
  • Save meltzerj/998428 to your computer and use it in GitHub Desktop.
Save meltzerj/998428 to your computer and use it in GitHub Desktop.
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