...
|
...
|
@@ -7,10 +7,6 @@ |
|
|
var $ = require('jquery'),
|
|
|
Hammer = require('hammer');
|
|
|
|
|
|
var $searchBox = $('.search-box'),
|
|
|
$indexSearch = $('.index-search'),
|
|
|
$indexLogo = $('.index-logo');
|
|
|
|
|
|
var floatLayerCloseHammer, floatLayerBtnHammer;
|
|
|
|
|
|
function downLoadApp() {
|
...
|
...
|
@@ -37,8 +33,9 @@ function downLoadApp() { |
|
|
// });
|
|
|
// });
|
|
|
|
|
|
floatLayerCloseHammer = new Hammer($('#float-layer-close')[0]);
|
|
|
floatLayerCloseHammer.on('tap', function(e) {
|
|
|
if ($('#float-layer-close') && $('#float-layer-close')[0]) {
|
|
|
floatLayerCloseHammer = new Hammer($('#float-layer-close')[0]);
|
|
|
floatLayerCloseHammer.on('tap', function(e) {
|
|
|
$('#float-layer-app').hide();
|
|
|
window.setCookie('_float-layer-app', 'id490655927',
|
|
|
{
|
...
|
...
|
@@ -49,69 +46,22 @@ floatLayerCloseHammer.on('tap', function(e) { |
|
|
domain: '.yohobuy.com',
|
|
|
expires: 1
|
|
|
});
|
|
|
});
|
|
|
});
|
|
|
}
|
|
|
|
|
|
// $('#float-layer-btn').tap(function () {
|
|
|
// downLoadApp('bottom');
|
|
|
// });
|
|
|
|
|
|
floatLayerBtnHammer = new Hammer($('#float-layer-btn')[0]);
|
|
|
floatLayerBtnHammer.on('tap', function(e) {
|
|
|
if ($('#float-layer-btn') && $('#float-layer-btn')[0]) {
|
|
|
floatLayerBtnHammer = new Hammer($('#float-layer-btn')[0]);
|
|
|
floatLayerBtnHammer.on('tap', function(e) {
|
|
|
downLoadApp('bottom');
|
|
|
});
|
|
|
});
|
|
|
|
|
|
if (!window.cookie('_float-layer-app')) {
|
|
|
if (!window.cookie('_float-layer-app')) {
|
|
|
$('#float-layer-app').show();
|
|
|
} else {
|
|
|
} else {
|
|
|
$('#float-layer-app').hide();
|
|
|
}
|
|
|
} |
|
|
|
|
|
/**
|
|
|
* 频道选择页面顶部搜索
|
|
|
* @author: bikai<kai.bi@yoho.cn>
|
|
|
* @date: 2015/10/28
|
|
|
*/
|
|
|
|
|
|
$searchBox.find('input').on('focus', function () {
|
|
|
$indexLogo.css({
|
|
|
width: 0,
|
|
|
display: 'none'
|
|
|
});
|
|
|
$searchBox.css({
|
|
|
width: '12.8rem'
|
|
|
});
|
|
|
$indexSearch.css({
|
|
|
width: '15.5rem'
|
|
|
});
|
|
|
$('.clear-text, .no-search').show();
|
|
|
}).on('blur', function () {
|
|
|
$indexLogo.css({
|
|
|
width: '5.4rem',
|
|
|
display: 'block'
|
|
|
});
|
|
|
$searchBox.css({
|
|
|
width: '8.8rem'
|
|
|
});
|
|
|
$indexSearch.css({
|
|
|
width: '9.6rem'
|
|
|
});
|
|
|
$('.clear-text, .no-search').hide();
|
|
|
});
|
|
|
|
|
|
$searchBox.find('.clear-text').click(function () {
|
|
|
$searchBox.find('input').val('').trigger('focus');
|
|
|
});
|
|
|
|
|
|
// clearTextHammer = new Hammer($searchBox.find('.clear-text')[0]);
|
|
|
// clearTextHammer.on('tap', function(e) {
|
|
|
// $searchBox.find('input').val('').trigger('focus');
|
|
|
// });
|
|
|
|
|
|
$searchBox.find('.search-icon').click(function () {
|
|
|
$indexSearch.submit();
|
|
|
});
|
|
|
|
|
|
// searchIconHammer = new Hammer($searchBox.find('.search-icon')[0]);
|
|
|
// searchIconHammer.on('tap', function(e) {
|
|
|
// $indexSearch.submit();
|
|
|
// }); |
|
|
\ No newline at end of file |
...
|
...
|
|