Toggle navigation
Toggle navigation
This project
Loading...
Sign in
fe
/
YOHOBUYWAP
·
Commits
Go to a project
GitLab
Go to group
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
徐祁xuqi
9 years ago
Commit
3d4e06af71c2f42ed059b9be48c6c75afe1a59eb
1 parent
d7840744
scroll end/start
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
26 additions
and
5 deletions
static/js/product/shop.js
static/js/product/shop.js
View file @
3d4e06a
...
...
@@ -257,10 +257,8 @@ function tabChange(dom, index) {
myScroll
&&
myScroll
.
refresh
();
scH
=
$
(
'#scroller'
).
outerHeight
();
$nav1
.
removeClass
(
'fixed-top'
);
$nav1
.
removeClass
(
'absolute'
);
$nav2
.
removeClass
(
'fixed-top'
);
$nav2
.
removeClass
(
'absolute'
);
$nav1
.
removeClass
(
'fixed-top absolute'
);
$nav2
.
removeClass
(
'fixed-top absolute'
);
}
if
(
!
$nav1
.
hasClass
(
'hide'
))
{
myScroll
.
scrollTo
(
0
,
0
-
imgH
);
...
...
@@ -280,7 +278,7 @@ myScroll.on('scroll', function() {
var
tra
;
if
(
sTop
+
winH
>
$
(
'#scroller'
).
height
()
-
0.25
*
$goodsContainer
.
height
()
-
50
)
{
if
(
sTop
+
winH
>
scH
-
0.25
*
$goodsContainer
.
height
()
-
50
)
{
if
(
$pre
!==
undefined
)
{
search
({
type
:
'shop_id'
,
...
...
@@ -381,6 +379,23 @@ myScroll.on('scroll', function() {
});
}
}
});
myScroll
.
on
(
'scrollStart'
,
function
()
{
// stop auto play when scroll
bannerSwiper
&&
bannerSwiper
.
stopAutoplay
();
multiSwiper
&&
multiSwiper
.
stopAutoplay
();
});
myScroll
.
on
(
'scrollEnd'
,
function
()
{
// start auto play when scroll end
bannerSwiper
&&
bannerSwiper
.
startAutoplay
();
multiSwiper
&&
multiSwiper
.
startAutoplay
();
$
(
'#scroller'
).
trigger
(
'scroll'
);
});
...
...
@@ -613,6 +628,8 @@ $subNav.on('touchend touchcancel', function(e) {
//点击筛选钱的active项回复active
$pre
.
addClass
(
'active'
);
$this
.
removeClass
(
'active'
);
myScroll
.
enable
();
}
else
{
$pre
=
$this
.
siblings
(
'.active'
);
...
...
@@ -620,6 +637,8 @@ $subNav.on('touchend touchcancel', function(e) {
$this
.
addClass
(
'active'
);
filter
.
showFilter
();
myScroll
.
disable
();
}
}
else
{
if
(
$this
.
hasClass
(
'new'
))
{
...
...
@@ -721,6 +740,8 @@ filter.initFilter({
//切换active状态到$pre上
$pre
.
addClass
(
'active'
);
$pre
.
siblings
(
'.filter'
).
removeClass
(
'active'
);
myScroll
.
enable
();
},
missStatus
:
true
});
...
...
Please
register
or
login
to post a comment