Toggle navigation
Toggle navigation
This project
Loading...
Sign in
chenchao
/
YOHOBUYPC
·
Commits
Go to a project
GitLab
Go to dashboard
Project
Activity
Files
Commits
Pipelines
0
Builds
0
Graphs
Milestones
Issues
0
Merge Requests
0
Members
Labels
Wiki
Forks
Network
Create a new issue
Download as
Email Patches
Plain Diff
Browse Files
Authored by
梁志锋
9 years ago
Commit
309f569ea174b4763ee8f14ba45e46359253c74a
1 parent
0e81e356
使用RAF
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
9 additions
and
4 deletions
static/js/cart/chose-panel.js
static/js/me/coupons.js
static/js/cart/chose-panel.js
View file @
309f569
...
...
@@ -242,10 +242,12 @@ $yohoPage.on('touchstart', '.color-list .block', function() {
// 颜色块切换勾选样式
$this
.
siblings
(
'.chosed'
).
removeClass
(
'chosed'
);
// 特殊处理
// 特殊处理
: 老的选中尺码在新选中的颜色对应尺码中不存在, 需要将颜色的第一行对应的颜色块加上勾选样式.
if
(
-
1
===
curGoodNum
)
{
$curColorBlock
=
$
(
$colorRowList
.
eq
(
0
).
children
().
get
(
index
));
$curColorBlock
.
addClass
(
'chosed'
);
// 当前选择的颜色块,加上勾选样式
}
else
{
$this
.
toggleClass
(
'chosed'
);
}
...
...
static/js/me/coupons.js
View file @
309f569
...
...
@@ -40,13 +40,16 @@ $('.employ span').each(function(index) {
});
});
$
(
window
).
scroll
(
function
()
{
if
(
$
(
window
).
scrollTop
()
+
$
(
window
).
height
()
>
$
(
'body'
).
height
()
-
1
)
{
function
scrollHandler
()
{
if
(
$
(
window
).
scrollTop
()
+
$
(
window
).
height
()
>
$
(
'body'
).
height
()
-
100
)
{
page
++
;
couponAJAX
(
statu
,
page
);
return
;
}
}
$
(
window
).
scroll
(
function
()
{
window
.
requestAnimationFrame
(
scrollHandler
);
});
couponAJAX
(
statu
,
page
);
\ No newline at end of file
...
...
Please
register
or
login
to post a comment