...
|
...
|
@@ -9,14 +9,21 @@ var $searchBox = $('.search-box'), |
|
|
$indexSearch = $('.index-search'),
|
|
|
$indexLogo = $('.index-logo');
|
|
|
|
|
|
var $search = $searchBox.children('input'),
|
|
|
$cancelSearch = $indexSearch.children('.no-search');
|
|
|
var $search = $searchBox.children('input[type="text"]'),
|
|
|
$cancelSearch = $indexSearch.children('.no-search'),
|
|
|
$searchIcon = $searchBox.children('.search-icon');
|
|
|
|
|
|
require('../common');
|
|
|
|
|
|
$search.on('focus', function() {
|
|
|
$indexSearch.addClass('action');
|
|
|
$indexLogo.addClass('action');
|
|
|
}).on('input', function() {
|
|
|
if ($search.val() === '') {
|
|
|
$searchIcon.addClass('empty');
|
|
|
} else {
|
|
|
$searchIcon.removeClass('empty');
|
|
|
}
|
|
|
});
|
|
|
|
|
|
$cancelSearch.on('touchstart', function() {
|
...
|
...
|
|