Toggle navigation
Toggle navigation
This project
Loading...
Sign in
fe
/
YOHOBUYPC
·
Commits
Go to a project
GitLab
Go to group
Project
Activity
Files
Commits
Pipelines
0
Builds
0
Graphs
Milestones
Issues
0
Merge Requests
2
Members
Labels
Wiki
Forks
Network
Create a new issue
Download as
Email Patches
Plain Diff
Browse Files
Authored by
uedxwg
9 years ago
Commit
ee56fa8320a3bba50ef031743eb4ce20dc3fae54
1 parent
3c8a4d01
hotrank添加导航高亮效果
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
7 additions
and
3 deletions
static/js/product/newsale/hot-rank.js
static/sass/product/_hot-rank.scss
template/m.yohobuy.com/actions/product/newsale/hotlist.phtml
static/js/product/newsale/hot-rank.js
View file @
ee56fa8
...
...
@@ -82,6 +82,7 @@ $('#hotRank').on('touchend touchcancel', function(e) {
var
target
=
ev
.
target
||
ev
.
srcElement
;
if
(
target
.
nodeName
.
toLowerCase
()
===
'span'
)
{
$
(
'.s-goods-nav .nav-item'
).
removeClass
(
'active'
);
target
.
parentNode
.
className
=
'active '
+
target
.
parentNode
.
className
;
id
=
target
.
getAttribute
(
'data-id'
)
?
target
.
getAttribute
(
'data-id'
)
:
''
;
sort
=
target
.
getAttribute
(
'data-sort'
)
?
target
.
getAttribute
(
'data-sort'
)
:
''
;
...
...
@@ -98,9 +99,9 @@ $('#hotRank').on('touchstart', function(e) {
var
target
=
ev
.
target
||
ev
.
srcElement
;
if
(
target
.
nodeName
.
toLowerCase
()
===
'span'
)
{
target
.
parentNode
.
className
=
'
a
ctive '
+
target
.
parentNode
.
className
;
target
.
parentNode
.
className
=
'
bgA
ctive '
+
target
.
parentNode
.
className
;
}
}).
on
(
'touchend touchcancel'
,
function
()
{
$
(
'.s-goods-nav .nav-item'
).
removeClass
(
'
a
ctive'
);
$
(
'.s-goods-nav .nav-item'
).
removeClass
(
'
bgA
ctive'
);
});
...
...
static/sass/product/_hot-rank.scss
View file @
ee56fa8
...
...
@@ -138,6 +138,9 @@
color
:
#999
;
&
.active
{
color
:
#000
;
}
&
.bgActive
{
color
:
#000
;
background-color
:
#e0e0e0
;
}
a
{
...
...
template/m.yohobuy.com/actions/product/newsale/hotlist.phtml
View file @
ee56fa8
...
...
@@ -3,7 +3,7 @@
<ul
class=
"swiper-wrapper clearfix"
>
{
{#
tabs
}
}
{
{#
title
}
}
<li
class=
"swiper-slide nav-item"
>
<li
class=
"swiper-slide nav-item
{{#if @first}} active{{/if}}
"
>
<span
data-sort=
"{{ params}}"
data-id=
"{{ id}}"
>
{
{
name
}
}</span>
</li>
{
{/
title
}
}
...
...
Please
register
or
login
to post a comment