|
@@ -8,7 +8,7 @@ var $searchBox = $('.search-box'), |
|
@@ -8,7 +8,7 @@ var $searchBox = $('.search-box'), |
8
|
$indexSearch = $('.index-search'),
|
8
|
$indexSearch = $('.index-search'),
|
9
|
$indexLogo = $('.index-logo');
|
9
|
$indexLogo = $('.index-logo');
|
10
|
|
10
|
|
11
|
-$searchBox.find('input').on('focus', function() {
|
11
|
+function showBigSearch() {
|
12
|
$indexLogo.css({
|
12
|
$indexLogo.css({
|
13
|
width: 0
|
13
|
width: 0
|
14
|
});
|
14
|
});
|
|
@@ -19,7 +19,9 @@ $searchBox.find('input').on('focus', function() { |
|
@@ -19,7 +19,9 @@ $searchBox.find('input').on('focus', function() { |
19
|
width: '15.5rem'
|
19
|
width: '15.5rem'
|
20
|
});
|
20
|
});
|
21
|
$('.clear-text, .no-search').show();
|
21
|
$('.clear-text, .no-search').show();
|
22
|
-}).on('blur', function() {
|
22
|
+}
|
|
|
23
|
+
|
|
|
24
|
+function hideBigSearch() {
|
23
|
$indexLogo.css({
|
25
|
$indexLogo.css({
|
24
|
width: '5.4rem'
|
26
|
width: '5.4rem'
|
25
|
});
|
27
|
});
|
|
@@ -30,12 +32,22 @@ $searchBox.find('input').on('focus', function() { |
|
@@ -30,12 +32,22 @@ $searchBox.find('input').on('focus', function() { |
30
|
width: '9.6rem'
|
32
|
width: '9.6rem'
|
31
|
});
|
33
|
});
|
32
|
$('.clear-text, .no-search').hide();
|
34
|
$('.clear-text, .no-search').hide();
|
|
|
35
|
+}
|
|
|
36
|
+
|
|
|
37
|
+$searchBox.find('input').on('focus', function() {
|
|
|
38
|
+ showBigSearch();
|
33
|
});
|
39
|
});
|
34
|
-$searchBox.find('.clear-text').click(function() {
|
|
|
35
|
- $searchBox.find('input').val('').trigger('focus');
|
40
|
+
|
|
|
41
|
+$searchBox.find('.clear-text').on('touchend', function() {
|
|
|
42
|
+ $searchBox.find('input').val('');
|
36
|
});
|
43
|
});
|
37
|
-$searchBox.find('.search-icon').click(function() {
|
44
|
+$searchBox.find('.search-icon').on('touchend', function() {
|
38
|
$indexSearch.submit();
|
45
|
$indexSearch.submit();
|
39
|
});
|
46
|
});
|
40
|
|
47
|
|
|
|
48
|
+$('.no-search').on('touchend', function() {
|
|
|
49
|
+ $searchBox.find('input').val('');
|
|
|
50
|
+ hideBigSearch();
|
|
|
51
|
+});
|
|
|
52
|
+
|
41
|
window.rePosFooter(); |
53
|
window.rePosFooter(); |