Toggle navigation
Toggle navigation
This project
Loading...
Sign in
fe
/
YOHOBUYPC
·
Commits
Go to a project
GitLab
Go to group
Project
Activity
Files
Commits
Pipelines
0
Builds
0
Graphs
Milestones
Issues
0
Merge Requests
2
Members
Labels
Wiki
Forks
Network
Create a new issue
Download as
Email Patches
Plain Diff
Browse Files
Authored by
cailing
9 years ago
Commit
4e379816a3fa997186cbf45fabb8958f9bdef3b0
1 parent
05ff559a
再次购买添加锚点
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
13 additions
and
2 deletions
web-static/js/cart/cart.js
web-static/js/cart/cart.js
View file @
4e37981
...
...
@@ -130,7 +130,17 @@ $cartnewSum.one('click', 'input[type="checkbox"]', function() {
};
choiceOut
(
dataJSON
);
});
// 滚动到第一个选中的商品
function
scrollToFirst
(){
var
$selected
=
$
(
'.pay-wapper tbody tr'
).
find
(
'.cart-item-check:checked'
);
var
top
=
0
;
if
(
$selected
.
length
>
0
){
$selected
=
$selected
.
eq
(
0
);
}
top
=
$selected
.
offset
().
top
-
50
;
$
(
'html,body'
).
scrollTop
(
top
);
return
false
;
}
function
isCheck
(
obj
,
className
)
{
selectArray
=
[];
dataJSON
=
{};
...
...
@@ -880,4 +890,5 @@ $payWapper.on('selectstart', function() {
});
$goodsDetail
.
on
(
'selectstart'
,
function
()
{
return
false
;
});
\ No newline at end of file
});
scrollToFirst
();
\ No newline at end of file
...
...
Please
register
or
login
to post a comment