...
|
...
|
@@ -67,11 +67,12 @@ function show(html, cb) { |
|
|
document.documentElement.scrollLeft || document.body.scrollLeft,
|
|
|
document.documentElement.scrollTop || document.body.scrollTop
|
|
|
],
|
|
|
$html = $('html'); // it would make more sense to apply this to body, but IE7 won't have that
|
|
|
$html = $('html, body'); // it would make more sense to apply this to body, but IE7 won't have that
|
|
|
|
|
|
$html.data('scroll-position', scrollPosition);
|
|
|
$html.data('previous-overflow', $html.css('overflow'));
|
|
|
$html.css('overflow', 'hidden');
|
|
|
$html.css('height', '100%');
|
|
|
window.scrollTo(scrollPosition[0], scrollPosition[1]);
|
|
|
|
|
|
if (html) {
|
...
|
...
|
@@ -89,11 +90,12 @@ function show(html, cb) { |
|
|
|
|
|
//隐藏当前Panel
|
|
|
function hide() {
|
|
|
var $html = $('html'),
|
|
|
var $html = $('html, body'),
|
|
|
scrollPosition = $html.data('scroll-position');
|
|
|
|
|
|
// un-lock scroll position
|
|
|
$html.css('overflow', $html.data('previous-overflow'));
|
|
|
$html.css('height', 'auto');
|
|
|
window.scrollTo(scrollPosition[0], scrollPosition[1]);
|
|
|
$('.chose-panel').hide();
|
|
|
}
|
...
|
...
|
|