header.js
734 Bytes
/**
* 公共头部
* @author: yyq<yanqing.yang@yoho.cn>
* @date: 2016/7/1
*/
var $ = require('yoho-jquery');
var delayer;
$('.yoho-group a').hover(function() {
var data = $(this).data();
$(this).text(data.cn);
}, function() {
var data = $(this).data();
$(this).text(data.en);
});
$('.contain-third').on({
mouseenter: function() {
var $thirdWrapper = $(this).children('.third-nav-wrapper');
delayer = setTimeout(function() {
$thirdWrapper.show();
}, 200);
},
mouseleave: function() {
var $thirdWrapper = $(this).children('.third-nav-wrapper');
if (delayer) {
clearTimeout(delayer);
}
$thirdWrapper.hide();
}
});