...
|
...
|
@@ -6,17 +6,18 @@ |
|
|
var $ = require('jquery');
|
|
|
|
|
|
var $searchBox = $('.search-box'),
|
|
|
$box = $('.box'),
|
|
|
$indexSearch = $('.index-search'),
|
|
|
$indexLogo = $('.index-logo');
|
|
|
|
|
|
var $search = $searchBox.children('input[type="text"]'),
|
|
|
$cancelSearch = $indexSearch.children('.no-search'),
|
|
|
$cancelSearch = $box.children('.no-search'),
|
|
|
$searchIcon = $searchBox.children('.search-icon');
|
|
|
|
|
|
require('../common');
|
|
|
|
|
|
$search.on('focus', function() {
|
|
|
$indexSearch.addClass('action');
|
|
|
$box.addClass('action');
|
|
|
$indexLogo.addClass('action');
|
|
|
}).on('input', function() {
|
|
|
if ($search.val() === '') {
|
...
|
...
|
@@ -27,7 +28,7 @@ $search.on('focus', function() { |
|
|
});
|
|
|
|
|
|
$cancelSearch.on('touchstart', function() {
|
|
|
$indexSearch.removeClass('action');
|
|
|
$box.removeClass('action');
|
|
|
$indexLogo.removeClass('action');
|
|
|
|
|
|
$search.blur();
|
...
|
...
|
|