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
Lynnic
9 years ago
Commit
d685be82a60f15c2132bf2b86582471152442298
1 parent
01e3b32d
添加显示或隐藏向左滑动提示功能
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
19 additions
and
0 deletions
static/js/product/detail/desc.js
static/js/product/detail/detail.js
static/js/product/detail/desc.js
View file @
d685be8
...
...
@@ -20,12 +20,27 @@ var sizeSwiper,
require
(
'../recommend-for-you.js'
);
//判断是否要显示向左滑动提示
function
hiddenTips
(
$ele
)
{
var
offsetContainer
=
$ele
[
0
].
getBoundingClientRect
().
right
;
var
offsetLastColumn
=
$ele
.
find
(
'.swiper-slide:last-child'
)[
0
].
getBoundingClientRect
().
right
;
if
(
offsetLastColumn
-
offsetContainer
<
0
)
{
$ele
.
next
(
'.tips'
).
css
(
'display'
,
'none'
);
}
else
{
$ele
.
next
(
'.tips'
).
css
(
'display'
,
'block'
);
}
}
function
search
()
{
if
(
searching
||
end
)
{
return
;
}
searching
=
true
;
// alert($('#reference-swiper-container .swiper-wrapper').width());
loading
.
showLoadingMask
();
$
.
ajax
({
...
...
@@ -47,6 +62,9 @@ function search() {
slidesPerView
:
'auto'
});
hiddenTips
(
$
(
'#size-swiper-container'
));
hiddenTips
(
$
(
'#reference-swiper-container'
));
searching
=
false
;
end
=
true
;
loading
.
hideLoadingMask
();
...
...
static/js/product/detail/detail.js
View file @
d685be8
...
...
@@ -13,6 +13,7 @@ require('./desc');
require
(
'./comments-consults'
);
lazyLoad
(
$
(
'img.lazy'
));
//顶部swiper
...
...
Please
register
or
login
to post a comment