Toggle navigation
Toggle navigation
This project
Loading...
Sign in
fe
/
yohobuy-node
·
Commits
Go to a project
GitLab
Go to group
Project
Activity
Files
Commits
Pipelines
0
Builds
0
Graphs
Milestones
Issues
1
Merge Requests
0
Members
Labels
Wiki
Forks
Network
Create a new issue
Download as
Plain Diff
Browse Files
Authored by
htoooth
8 years ago
Commit
8fcb4fa620335dfc84f51d48c6ec831e2d8b27ea
2 parents
80075be1
f4ffc77e
Merge branch 'feature/new-product-arrive' into gray
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
10 additions
and
8 deletions
public/js/product/newArrive.page.js
public/js/product/newArrive.page.js
View file @
8fcb4fa
...
...
@@ -228,24 +228,26 @@ $('#new-product-floor').on('click', '.catagory-navs li', function() {
*/
$
(
function
()
{
// 轮播数量不够隐藏左右箭头
var
$swiper
=
$
(
'#rec-swiper, #brand-swiper'
),
recNum
=
$swiper
.
find
(
'.swiper-wrapper > .swiper-slide'
).
length
,
$prev
=
$swiper
.
find
(
'.prev'
),
$next
=
$swiper
.
find
(
'.next'
);
var
$recSwiper
=
$
(
'#rec-swiper'
),
$brandSwiper
=
$
(
'#brand-swiper'
),
recNum
=
$recSwiper
.
find
(
'.swiper-wrapper > .swiper-slide'
).
length
,
brandNum
=
$brandSwiper
.
find
(
'.swiper-wrapper > .swiper-slide'
).
length
;
if
(
recNum
<=
6
)
{
$prev
.
addClass
(
'hide'
);
$next
.
addClass
(
'hide'
);
$recSwiper
.
find
(
'.prev,.next'
).
addClass
(
'hide'
);
}
if
(
brandNum
<=
6
)
{
$brandSwiper
.
find
(
'.prev,.next'
).
addClass
(
'hide'
);
}
SwiperSingle
.
getSwiperWidth
(
$
(
'#rec-swiper'
));
//初始化宽度
SwiperSingle
.
getSwiperWidth
(
$
(
'#brand-swiper'
));
//初始化宽度
$
next
.
on
(
'click'
,
function
()
{
$
(
'.next'
)
.
on
(
'click'
,
function
()
{
SwiperSingle
.
next
(
$
(
this
).
parent
());
});
$
prev
.
on
(
'click'
,
function
()
{
$
(
'.prev'
)
.
on
(
'click'
,
function
()
{
SwiperSingle
.
prev
(
$
(
this
).
parent
());
});
...
...
Please
register
or
login
to post a comment