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
unknown
9 years ago
Commit
df5c449f29e997a902975075bd27a80a40fe6ef9
1 parent
989115ba
banner 背景色 @review by 王成龙
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
13 additions
and
4 deletions
template/www.yohobuy.com/partials/index/slide-banner.phtml
web-static/js/common/slider.js
web-static/js/home/home.js
template/www.yohobuy.com/partials/index/slide-banner.phtml
View file @
df5c449
...
...
@@ -2,7 +2,7 @@
<div class="slide-wrapper">
<ul>
{{# list}}
<li style="background
Color
:{{bgColor}}">
<li style="background:{{bgColor}}">
<a href="{{href}}" target= "_blank">
<img class="lazy" data-original="{{img}}" alt="">
</a>
...
...
web-static/js/common/slider.js
View file @
df5c449
...
...
@@ -21,6 +21,10 @@ var $ = require('yoho.jquery'),
Slider
.
prototype
=
{
init
:
function
()
{
if
(
!
this
.
$element
)
{
return
;
}
if
(
this
.
len
<=
1
)
{
lazyLoad
(
this
.
$element
.
find
(
'img.lazy'
));
return
;
...
...
@@ -126,7 +130,13 @@ var $ = require('yoho.jquery'),
this
.
smallItem
.
eq
(
this
.
index
).
addClass
(
'focus'
).
siblings
().
removeClass
(
'focus'
);
this
.
bigItem
.
eq
(
this
.
index
).
fadeIn
().
siblings
().
fadeOut
();
this
.
bigItem
.
eq
(
this
.
index
).
show
().
stop
().
animate
({
opacity
:
1
}).
siblings
().
stop
().
animate
({
opacity
:
0
},
function
()
{
$
(
this
).
hide
();
});
},
_autoplay
:
function
()
{
var
that
=
this
;
...
...
web-static/js/home/home.js
View file @
df5c449
...
...
@@ -41,9 +41,8 @@ if (homePage === 'boys') {
$
(
'.slide-container'
).
slider
({
pagination
:
'.thumb-pagination'
});
}
else
if
(
homePage
===
'girls'
)
{
$
(
'.center-col'
).
slider
();
}
else
{
$
(
'.center-col'
).
slider
();
$
(
'.slide-container'
).
slider
();
}
...
...
Please
register
or
login
to post a comment