...
|
...
|
@@ -32,6 +32,7 @@ var $chosePanel = $('#chose-panel'), |
|
|
queryString,
|
|
|
$yohoPage = $('.yoho-page');
|
|
|
|
|
|
|
|
|
//初始化购物车面板显示
|
|
|
function init() {
|
|
|
hasChooseColor = false;
|
...
|
...
|
@@ -60,7 +61,19 @@ function checkColorSizeNum() { |
|
|
return true;
|
|
|
}
|
|
|
|
|
|
|
|
|
function show(html, cb) {
|
|
|
var scrollPosition = [
|
|
|
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.data('scroll-position', scrollPosition);
|
|
|
$html.data('previous-overflow', $html.css('overflow'));
|
|
|
$html.css('overflow', 'hidden');
|
|
|
window.scrollTo(scrollPosition[0], scrollPosition[1]);
|
|
|
|
|
|
if (html) {
|
|
|
$chosePanel.html(html);
|
|
|
if ($('#promotionId').val() !== '') {
|
...
|
...
|
@@ -76,6 +89,12 @@ function show(html, cb) { |
|
|
|
|
|
//隐藏当前Panel
|
|
|
function hide() {
|
|
|
var $html = $('html'),
|
|
|
scrollPosition = $html.data('scroll-position');
|
|
|
|
|
|
// un-lock scroll position
|
|
|
$html.css('overflow', $html.data('previous-overflow'));
|
|
|
window.scrollTo(scrollPosition[0], scrollPosition[1]);
|
|
|
$('.chose-panel').hide();
|
|
|
}
|
|
|
|
...
|
...
|
|