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
Plain Diff
Browse Files
Authored by
xuqi
9 years ago
Commit
c4092f727eaeb36fd2c658552cd17456b0fd4d93
2 parents
f2fa2f05
f1cdbad6
Merge branch 'develop' of
http://git.dev.yoho.cn/web/yohobuy
into develop
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
10 additions
and
2 deletions
static/js/category/brand.js
static/js/index/search.js
static/sass/category/_brand.scss
static/sass/index/_search.scss
static/js/category/brand.js
View file @
c4092f7
...
...
@@ -14,6 +14,7 @@ var swiper,
$brandText
,
$brandHref
,
$brandList
=
$
(
'.brand-list'
);
var
$icon
=
$
(
'.search-icon'
);
var
searchH
=
$
(
'.newbrand-search'
).
outerHeight
(),
headerH
=
$
(
'.yoho-header'
).
outerHeight
(),
...
...
@@ -142,9 +143,11 @@ if ($('.brand-search-page').length) {
$
(
'.history'
).
css
(
'display'
,
'none'
);
if
(
$keyword
.
val
().
length
)
{
searchResult
();
$icon
.
css
(
'color'
,
'#000'
);
$
(
this
).
closest
(
'.search-box'
).
css
(
'width'
,
'11.25rem'
);
$
(
'.search-action'
).
show
();
}
else
{
$icon
.
css
(
'color'
,
'#b2b2b2'
);
$
(
this
).
closest
(
'.search-box'
).
css
(
'width'
,
'12.5rem'
);
$
(
'.search-action'
).
hide
();
}
...
...
static/js/index/search.js
View file @
c4092f7
...
...
@@ -11,6 +11,8 @@ var $input = $('#search-input input');
var
$clear
=
$
(
'#search-input .clear-input'
);
var
$icon
=
$
(
'.search-icon'
);
var
$form
=
$
(
'#search-form'
);
var
$history
=
$
(
'.history'
);
...
...
@@ -32,8 +34,10 @@ chHammer.on('tap', function() {
$input
.
on
(
'input'
,
function
()
{
if
(
$input
.
val
()
===
''
)
{
$icon
.
css
(
'color'
,
'#b2b2b2'
);
$clear
.
addClass
(
'hide'
);
}
else
{
$icon
.
css
(
'color'
,
'#000'
);
$clear
.
removeClass
(
'hide'
);
}
});
...
...
static/sass/category/_brand.scss
View file @
c4092f7
...
...
@@ -44,7 +44,8 @@
border
:
none
;
width
:
95%
;
height
:
60rem
/
$pxConvertRem
;
line-height
:
1
;
line-height
:
60rem
/
$pxConvertRem
;
font-size
:
1
.2em
;
padding
:
0
10rem
/
$pxConvertRem
;
}
...
...
static/sass/index/_search.scss
View file @
c4092f7
...
...
@@ -38,7 +38,7 @@
left
:
515rem
/
$pxConvertRem
;
border
:
none
;
background
:
transparent
;
color
:
#
000
;
color
:
#
b2b2b2
;
font-size
:
32rem
/
$pxConvertRem
;
line-height
:
56rem
/
$pxConvertRem
;
}
...
...
Please
register
or
login
to post a comment