...
|
...
|
@@ -6,6 +6,10 @@ |
|
|
|
|
|
var $ = require('yoho.zepto');
|
|
|
|
|
|
var $searchBox = $('.search-box'),
|
|
|
$indexSearch = $('.index-search'),
|
|
|
$indexLogo = $('.index-logo');
|
|
|
|
|
|
function downLoadApp() {
|
|
|
var appUrl = 'http://a.app.qq.com/o/simple.jsp?pkgname=com.yoho&g_f=995445';
|
|
|
var clickedAt = new Date();
|
...
|
...
|
@@ -40,3 +44,42 @@ if (!window.cookie('_float-layer-app')) { |
|
|
$('#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').tap(function () {
|
|
|
$searchBox.find('input').val('').trigger('focus');
|
|
|
});
|
|
|
|
|
|
$searchBox.find('.search-icon').tap(function () {
|
|
|
$indexSearch.submit();
|
|
|
}); |
|
|
\ No newline at end of file |
...
|
...
|
|