$(function() { /********页面通用**********/ //页面滚动动画效果初始化 new wow().init() $('.fancybox').fancybox() /* 首页 */ if ($('.banner').length > 0) { $('.banner').slide({ maincell: '.bd ul', autoplay: false }) } //产品中心图片滚动 $('.picscroll-left').slide({ titcell: '.hd ul', maincell: '.bd ul', autopage: true, effect: 'left', autoplay: false, vis: 3, trigger: 'click' }) //合作伙伴图片滚动 $('.picscroll-left2').slide({ titcell: '.hd ul', maincell: '.bd ul', autopage: true, effect: 'left', autoplay: false, vis: 4, trigger: 'click' }) //搜索 if ($('.j_search').length > 0) { $('.j_search').click(function(e) { e.preventdefault() $('.topsoso').addclass('show') }) $('.j_searchclose').click(function(e) { e.preventdefault() $('.topsoso').removeclass('show') }) } //微信二维码 $('.j_weixin').click(function(e) { e.preventdefault() $('#fixed_weixin').addclass('show') }) $('#fixed_weixin').click(function(e) { e.preventdefault() $('#fixed_weixin').removeclass('show') }) $('.j_ewm').click(function(e) { e.preventdefault() $('#fixed_ewm').addclass('show') }) $('#fixed_ewm').click(function(e) { e.preventdefault() $('#fixed_ewm').removeclass('show') }) $('.j_shouji').click(function(e) { e.preventdefault() $('#fixed_shouji').addclass('show') }) $('#fixed_shouji').click(function(e) { e.preventdefault() $('#fixed_shouji').removeclass('show') }) // $(window).on('scroll', function() { var scroll_top = $(this).scrolltop() if (scroll_top > 1) { $('.m_topbar').css('display', 'none') } else { $('.m_topbar').css('display', 'block') } }) //客服 $('#online_open').click(function(e) { e.preventdefault() $('#online_lx').css('display', 'block') }) $('#online_close').click(function() { $('#online_lx').css('display', 'none') }) //gotop $('#gotop').click(function() { $(window).scrolltop(0) }) /* 产品详情页 */ if ($('.slidebox').length > 0) { $('.slidebox').slide({ maincell: '.bd ul', autoplay: false, effect: 'left' }) } if ($('.j_tab').length > 0) { $('.j_tab a').each(function(i) { $(this).on('click', function() { var idx = i $(this) .siblings() .removeclass('active') $(this).addclass('active') $('.j_content .item').removeclass('active') $('.j_content .item') .eq(idx) .addclass('active') }) }) } }) $(function(){ var win_h = $(window).height(); $(".block_fr_01").css("bottom",40); var timer1; var timer2; var timer3; var timer4; var timer5; var bloackfr = $('.block_fr_01') bloackfr.find('dd>a.ewm').hover(function(){ cleartimeout(timer5); $(this).parent().prev().find('.smgz').stop(false,true).fadein(); },function(){ var that=this; timer4 = settimeout(function(){ $(that).parent().prev().find('.smgz').stop(false,true).fadeout(); },500) }); $(".smgz").hover(function(){ cleartimeout(timer4); $(this).stop(false,true); },function(){ var that=this; timer5 = settimeout(function(){ $(that).stop(false,true).fadeout(); },500) }); bloackfr.find('dd>a.qq').hover(function(){ cleartimeout(timer2); cleartimeout(timer3); bloackfr.find('#qqnum').stop(false,true).fadein(); },function(){ timer1 = settimeout(function(){ bloackfr.find('#qqnum').stop(false,true).fadeout(); },500) }); bloackfr.find('dd>a.phone').hover(function(){ cleartimeout(timer1); cleartimeout(timer3); bloackfr.find('#qqnum').stop(false,true).fadein(); },function(){ timer2 = settimeout(function(){ bloackfr.find('#qqnum').stop(false,true).fadeout(); },500) }); $("#qqnum").hover(function(){ cleartimeout(timer1); cleartimeout(timer2); $(this).stop(false,true); },function(){ var that=this; timer3 = settimeout(function(){ $(that).stop(false,true).fadeout(); },500) }); // bloackfr.find('dd>a.phone').hover(function(){ // bloackfr.find('#qqnum').stop(false,true).fadein(); // },function(){ // bloackfr.find('#qqnum').stop(false,true).fadeout(); // }); bloackfr.find('.clickfb').click(function(){ $(this).parent().find('.lyfk').stop(false,true).fadetoggle(); }); bloackfr.find('dd>a').last().click(function(){ $('body,html').animate({scrolltop:0}); }); bloackfr.find('.closebt').click(function(){bloackfr.find('.lyfk').stop(false,true).fadetoggle();}); });