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
Email Patches
Plain Diff
Browse Files
Authored by
lore-w
9 years ago
Commit
4acd4aa4893ece808788b492bfa3b5d1092a94c1
1 parent
20425704
商品列表bug修改 code review by liuyue
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
21 additions
and
19 deletions
template/www.yohobuy.com/partials/layout/use.phtml
web-static/js/product/product.js
template/www.yohobuy.com/partials/layout/use.phtml
View file @
4acd4aa
...
...
@@ -13,6 +13,7 @@
<script>
seajs.use(['js/product/list', 'js/product/product'], function (list, product) {
product.init(5);
window.onresize = function () {
setTimeout(function () {
product.init(5);
...
...
@@ -28,6 +29,7 @@
<script>
seajs.use(['js/product/list', 'js/product/product'], function (list, product) {
product.init(4);
window.onresize = function () {
setTimeout(function () {
product.init(4);
...
...
web-static/js/product/product.js
View file @
4acd4aa
...
...
@@ -143,22 +143,22 @@ exports.init = function(num) {
display
:
'none'
});
});
//鼠标放在颜色列表上效果
$
(
document
).
on
(
'hover'
,
'.good-select-color li'
,
function
()
{
var
coverImg
=
$
(
this
).
find
(
'img'
).
attr
(
'data-cover'
),
$coverImg
=
$
(
this
).
closest
(
'.good-item-wrapper'
).
find
(
'.good-detail-img'
).
find
(
'img'
);
$coverImg
.
attr
(
'src'
,
coverImg
);
});
// 左侧导航
$productListNav
.
click
(
function
()
{
if
(
$
(
this
).
hasClass
(
'active'
))
{
$
(
this
).
find
(
'.sort-child-list'
).
stop
(
true
,
true
).
slideUp
();
}
else
{
$
(
this
).
find
(
'.sort-child-list'
).
stop
(
true
,
true
).
slideDown
();
}
$
(
this
).
toggleClass
(
'active'
);
});
};
\ No newline at end of file
};
//鼠标放在颜色列表上效果
$
(
document
).
on
(
'hover'
,
'.good-select-color li'
,
function
()
{
var
coverImg
=
$
(
this
).
find
(
'img'
).
attr
(
'data-cover'
),
$coverImg
=
$
(
this
).
closest
(
'.good-item-wrapper'
).
find
(
'.good-detail-img'
).
find
(
'img'
);
$coverImg
.
attr
(
'src'
,
coverImg
);
});
// 左侧导航
$productListNav
.
click
(
function
()
{
if
(
$
(
this
).
hasClass
(
'active'
))
{
$
(
this
).
find
(
'.sort-child-list'
).
stop
(
true
,
true
).
slideUp
();
}
else
{
$
(
this
).
find
(
'.sort-child-list'
).
stop
(
true
,
true
).
slideDown
();
}
$
(
this
).
toggleClass
(
'active'
);
});
\ No newline at end of file
...
...
Please
register
or
login
to post a comment