Toggle navigation
Toggle navigation
This project
Loading...
Sign in
wangshusheng
/
YOHOBUYPC
·
Commits
Go to a project
GitLab
Go to dashboard
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
毕凯
9 years ago
Commit
cb0325c2aed79cd28f661c19453b52a23d87b294
1 parent
a0889bb0
整理代码
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
5 additions
and
4 deletions
static/js/category/brand.js
static/js/category/brand.js
View file @
cb0325c
...
...
@@ -14,6 +14,7 @@ var swiper,
$brandList
=
$
(
'.brand-list'
),
$icon
=
$
(
'.search-icon'
),
$genderItem
=
$
(
'.genderNav li'
),
$searchAction
=
$
(
'.search-action'
),
hotBrandsSwiper
;
var
searchH
=
$
(
'.newbrand-search'
).
outerHeight
(),
...
...
@@ -156,11 +157,11 @@ if ($('.brand-search-page').length) {
if
(
$keyword
.
val
().
length
)
{
$icon
.
css
(
'color'
,
'#000'
);
$
(
this
).
closest
(
'.search-box'
).
css
(
'width'
,
'11.25rem'
);
$
(
'.search-action'
)
.
show
();
$
searchAction
.
show
();
}
else
{
$icon
.
css
(
'color'
,
'#b2b2b2'
);
$
(
this
).
closest
(
'.search-box'
).
css
(
'width'
,
'12.5rem'
);
$
(
'.search-action'
)
.
hide
();
$
searchAction
.
hide
();
}
searchResult
();
}).
focus
();
...
...
@@ -168,13 +169,13 @@ if ($('.brand-search-page').length) {
// 2016.1.13 产品(高扬)要求进入页面默认显示取消按钮
$icon
.
css
(
'color'
,
'#000'
);
$keyword
.
closest
(
'.search-box'
).
css
(
'width'
,
'11.25rem'
);
$
(
'.search-action'
)
.
show
();
$
searchAction
.
show
();
clearTextHammer
=
new
Hammer
(
$
(
'.clear-text'
)[
0
]);
clearTextHammer
.
on
(
'tap'
,
function
(
e
)
{
e
.
preventDefault
();
$
(
'.search-result'
).
html
(
''
);
$
(
'#keyword'
).
val
(
''
).
trigger
(
'input'
);
e
.
preventDefault
();
e
.
srcEvent
.
stopPropagation
();
});
...
...
Please
register
or
login
to post a comment