Toggle navigation
Toggle navigation
This project
Loading...
Sign in
fe
/
YOHOOD
·
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
whb
10 years ago
Commit
a00bd7208eeb1d80617a53ce63c731b1dd21dbf3
1 parent
e4a9ead5
修改bug
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
7 additions
and
11 deletions
res/js/yohood.js
res/js/yohood.js
View file @
a00bd72
...
...
@@ -388,6 +388,9 @@ define('yohood', function(require, exports) {
},
success
:
function
(
data
)
{
$
(
"#brand_detail"
).
html
(
data
);
if
(
$
(
window
).
height
()
<
580
)
{
//小屏幕,去掉关闭按钮
$
(
"#brand_detail"
).
find
(
'.brand-close-btn'
).
remove
();
}
$
(
'.overlay'
).
show
();
}
});
...
...
@@ -521,6 +524,7 @@ define('yohood', function(require, exports) {
$
(
this
).
addClass
(
'current'
).
siblings
().
removeClass
(
'current'
);
$
(
'.side-related-list'
).
hide
().
eq
(
nowIndex
).
show
();
});
if
(
$
(
'.detail-body'
).
outerHeight
()
>
$
(
'.detail-side'
).
outerHeight
()
&&
navigator
.
userAgent
.
indexOf
(
'iPad'
)
===
-
1
)
{
//右侧相关文章定位
relatedPost
=
$
(
'.side-related-post'
);
...
...
@@ -548,18 +552,10 @@ define('yohood', function(require, exports) {
}
else
{
relatedPost
.
removeClass
(
'fix'
).
removeAttr
(
'style'
);
}
if
(
$
(
this
).
scrollTop
()
<=
maxH
-
relatedH
)
{
relatedPost
.
css
({
'position'
:
'fixed'
,
'top'
:
0
});
}
}
else
{
relatedPost
.
removeClass
(
'fix'
).
removeAttr
(
'style'
);
}
});
}
});
}
//分享按钮位置
var
shareOffsetTop
=
$
(
".share"
).
offset
().
top
;
$
(
window
).
scroll
(
function
()
{
...
...
Please
register
or
login
to post a comment