$(function () { // 导航链接hover跳转 var jumpTimer; var time = 0; //$('.nav-list li a').on('mouseenter', (event) => { //var link = $(event.target).data('link'); //var current_id = $(".nav-list li.active a").attr('id') //var target_id = $(event.target).attr('id'); //jumpTimer = setInterval(() => { //console.log(time) //time = time + 20 //if(time > 0 & current_id != target_id) { //jumpTimer && clearInterval(jumpTimer) //window.location.href = link //} //},20) //}) //$('.nav-list li a').on('mouseleave', (event) => { //time = 0 //jumpTimer && clearInterval(jumpTimer) //}) // 语言链接hovert跳转 //$('#change_lang').on('mouseenter', (event) => { //time = 0; //var link = $('#change_lang a').attr('href') //jumpTimer = setInterval(() => { //time = time + 20 //if(time > 0) { //jumpTimer && clearInterval(jumpTimer) //window.location.href = link //} //},20) //}) //$('#change_lang').on('mouseleave', (event) => { //time = 0 //clearInterval(jumpTimer) //}) // 视频播放hover开始播放(链接class hover_play_video 可设置poster) $(".hover_play_video").on('click', (event) => { var link = $(event.target).data('link'); $("#video_mask video").attr('src', link) var poster = $(event.target).children('img').attr('src') if(poster) { $("#video_mask video").attr('poster', poster) } $("#video_mask").show() var video_play = document.getElementById('video_play') video_play.play() }) // 通用链接跳转(当前页面打开) //$(".hover_link_jump").on('mouseover', (event) => { //var link = $(event.target).attr('href'); //if(!link) { //link = $(event.target).parent().attr('href'); //} //var new_tab = $(event.target).data('tab'); //var current_link = window.location.href //if(link == current_link) { //return //} //if(new_tab == 'new') { // 在新页面打开 //window.open(link,"_blank"); //}else { // 在原来页面打开 //window.location.href = link //} //}) })