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
Plain Diff
Browse Files
Authored by
hf
9 years ago
Commit
728b1969078b677e460f5ac4ac76cf1cf5d11f61
2 parents
a9358783
b284d1ab
Merge remote-tracking branch 'origin/develop'
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
7 additions
and
9 deletions
static/js/guang/home.js
static/js/guang/list.js
static/js/guang/home.js
View file @
728b196
...
...
@@ -15,8 +15,7 @@ var $loadMoreInfo = $('#load-more-info');
var
$loading
=
$
(
''
),
$noMore
=
$
(
''
);
var
winH
=
$
(
window
).
height
(),
loadMoreH
=
$loadMoreInfo
.
height
();
var
winH
=
$
(
window
).
height
();
var
$infoList
=
$
(
'#info-list'
),
$infos
=
$infoList
.
children
(
'.info-list'
),
...
...
@@ -107,7 +106,9 @@ navHammer.on('tap', function(e) {
});
$
(
document
).
scroll
(
function
()
{
if
(
$
(
window
).
scrollTop
()
+
winH
>=
$
(
document
).
height
()
-
loadMoreH
-
50
)
{
loadMore
(
$infos
.
not
(
'.hide'
),
state
[
curType
]);
var
$c
=
$infos
.
not
(
'.hide'
);
if
(
$
(
window
).
scrollTop
()
+
winH
>=
$
(
document
).
height
()
-
0.25
*
$c
.
height
())
{
loadMore
(
$c
,
state
[
curType
]);
}
});
\ No newline at end of file
...
...
static/js/guang/list.js
View file @
728b196
...
...
@@ -9,8 +9,7 @@ var $ = require('jquery');
var
info
=
require
(
'./info'
),
loadMore
=
info
.
loadMore
;
var
winH
=
$
(
window
).
height
(),
loadMoreH
=
$
(
'#load-more'
).
height
();
var
winH
=
$
(
window
).
height
();
var
$author
=
$
(
'#author-infos'
);
var
$tag
=
$
(
'#tag'
);
...
...
@@ -41,9 +40,7 @@ if ($tag.length > 0) {
}
$
(
document
).
scroll
(
function
()
{
//设置50px阈值
if
(
$
(
window
).
scrollTop
()
+
winH
>=
$
(
document
).
height
()
-
loadMoreH
-
50
)
{
if
(
$
(
window
).
scrollTop
()
+
winH
>=
$
(
document
).
height
()
-
0.25
*
$infos
.
height
())
{
loadMore
(
$infos
,
setting
);
}
});
\ No newline at end of file
...
...
Please
register
or
login
to post a comment