Toggle navigation
Toggle navigation
This project
Loading...
Sign in
fe
/
YOHO-ACTIVITY-PHP
·
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
Plain Diff
Browse Files
Authored by
hf
9 years ago
Commit
7ccb37489e62ad7a5af85d6824053aae83567093
2 parents
54f157e7
e767609f
Merge branch 'develop' of
http://git.dev.yoho.cn/web/yohobuy
into develop
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
32 additions
and
6 deletions
framework
static/js/home/maybe-like.js
framework
@
119c247f
Subproject commit
75bbc3b075de19f239532f60c5995d06c5f814e2
Subproject commit
119c247f5cf929aa1e059e40609bb16dd6b58f05
...
...
static/js/home/maybe-like.js
View file @
7ccb374
...
...
@@ -19,7 +19,11 @@ var winH = $(window).height(),
num
,
url
;
///recom/maylikekids
var
$curNav
,
index
,
$navList
=
$
(
'#maybe-like-nav'
);
//ajax url
if
(
kidsType
)
{
url
=
'/product/recom/maylikekids'
;
}
else
if
(
lifestyleType
)
{
...
...
@@ -28,15 +32,38 @@ if (kidsType) {
url
=
'/product/recom/maylike?gender='
+
gender
;
}
$curNav
=
$navList
.
children
(
'.focus'
);
$
(
'#maybe-like-nav'
).
delegate
(
'li'
,
'touchstart'
,
function
()
{
var
$this
=
$
(
this
),
$goods
=
$
(
'.goods-list'
),
$content
;
if
(
$this
.
hasClass
(
'focus'
))
{
return
;
}
index
=
$this
.
index
();
$this
.
addClass
(
'focus'
);
$curNav
.
removeClass
(
'focus'
);
$goods
.
not
(
'.hide'
).
addClass
(
'hide'
);
$content
=
$goods
.
eq
(
index
);
$content
.
removeClass
(
'hide'
);
$curNav
=
$this
;
$
(
document
).
trigger
(
'scroll'
);
//Trigger lazyLoad
});
//srcoll to load more
$
(
window
).
scroll
(
function
()
{
if
(
$
(
window
).
scrollTop
()
+
winH
>=
$
(
document
).
height
()
-
loadMoreH
)
{
// 没数据了,就不再加载
if
(
loading
)
{
return
;
}
loading
=
true
;
num
=
$goodList
.
children
(
'.good-info'
).
length
;
$
.
ajax
({
...
...
@@ -50,7 +77,6 @@ $(window).scroll(function () {
loading
=
true
;
return
;
}
$goodList
.
append
(
data
);
//lazyLoad
...
...
Please
register
or
login
to post a comment