// javascript document $(function(){ //扫描微信 $('#wechat').hover(function(){ $('.wechat').stop().slidetoggle(); }); //产品展示特效 $('.img-box').mouseover(function(){ $(this).children().children('img').eq(0).stop().animate({width:"279px",height:"181px"},200); $(this).children().children('.img-boxbg').stop().show(); $(this).children().children('h3').stop().animate({left:"50%"},200); $(this).children().children('img.search').stop().animate({right:"50%"},200); }); $('.img-box').mouseout(function(){ $(this).children().children('img').eq(0).stop().animate({width:"278px",height:"180px"},200); $(this).children().children('.img-boxbg').stop().hide(); $(this).children().children('h3').stop().animate({left:"-80px"},200); $(this).children().children('img.search').stop().animate({right:"-30px"},200); }); //切换特效 $('.mr_fru2 ul li').mouseover(function(){ $(this).children('.info').stop().animate({height:"225px"},300); }); $('.mr_fru2 ul li').mouseout(function(){ $(this).children('.info').stop().animate({height:"40px"},300); }); //诚聘英才特效 var moveh = $(".cpyctab-con li").height(); // $(".cpyctab-con li").eq(0).css({height:moveh}); $(".cpyctab-top li").click(function(){ $(this).addclass('cpyc-active').siblings().removeclass('cpyc-active'); var index = $(".cpyctab-top li").index(this); $(".cpyctab-con li").eq(index).stop().animate({height:moveh},500).siblings().stop().animate({height:"0"},500); }); //关于我们特效 $(".about-con>li").eq(0).css({display:"block"}); $(".about-nav>li").click(function(){ $(this).addclass('about-active').siblings().removeclass('about-active'); var index = $(".about-nav>li").index(this); $(".about-con>li").eq(index).css({display:"block"}).siblings().css({display:"none"}); }); }); //导航特效 $(function () { var navli=$(".menu .nav li"); navli.mouseover(function () { $(this).addclass("current").siblings().removeclass("current"); $(this).find(".box").stop().slidedown(); }) navli.mouseleave(function(){ $(this).find(".box").stop().hide(); }) }); //banner特效 $(document).ready(function () { $(".main_visual").hover(function(){ $("#btn_prev,#btn_next").fadein() },function(){ $("#btn_prev,#btn_next").fadeout() }) $dragbln = false; $(".main_image").touchslider({ flexible : true, speed : 400, btn_prev : $("#btn_prev"), btn_next : $("#btn_next"), paging : $(".flicking_con a"), counter : function (e) { $(".flicking_con a").removeclass("on").eq(e.current-1).addclass("on"); } }); $(".main_image").bind("mousedown", function() { $dragbln = false; }) $(".main_image").bind("dragstart", function() { $dragbln = true; }) $(".main_image a").click(function() { if($dragbln) { return false; } }) timer = setinterval(function() { $("#btn_next").click();}, 4000); $(".main_visual").hover(function() { clearinterval(timer); }, function() { timer = setinterval(function() { $("#btn_next").click();}, 4000); }) $(".main_image").bind("touchstart", function() { clearinterval(timer); }).bind("touchend", function() { timer = setinterval(function() { $("#btn_next").click();}, 4000); }) }); //产品列表特效 jquery(document).ready(function($) { $(".index_nav li a").click(function(event) { var index=this.title; var id='#'+'index_'+index; $("html,body").animate({scrolltop: $(id).offset().top - 50}, 1000); }); $(".taoba").click(function(event) { var index=this.title; var id='#'+'index_'+index; $("html,body").animate({scrolltop: $(id).offset().top - 50}, 1000); }); function a(x,y){ l = $('#main').offset().left; w = $('#main').width(); // $('#tbox').css('left',(l + w + x) + 'px'); // $('#tbox').css('top',y-50 + 'px'); } //获取#tbox的div距浏览器底部和页面内容区域右侧的距离函数#main为页面的可视宽度 $(function() { var headerh = $(".header").height(); var bannerh = $(".banner-inside").height(); var pathnavh = $(".content-tit").height(); var indexnavwraph = $(".indexnav_wrap").height(); var fixenavh = parseint(headerh) + parseint(bannerh) + parseint(pathnavh) + parseint(indexnavwraph) + 20; //页面向上滚动距离悬浮导航出现 $(window).scroll(function(){ t = $(document).scrolltop(); if(t>fixenavh){ $('#tbox').show(); }else{ $('#tbox').hide(); } if(t > 50){ $('#gotop').fadein('slow'); }else{ $('#gotop').fadeout('slow'); } }) // a(10,100);//#tbox的div距浏览器底部和页面内容区域右侧的距离 $('#gotop').click(function(){ $('body,html').animate({ scrolltop: 0 }, 800);//点击回到顶部按钮,缓懂回到顶部,数字越小越快 return false; }) }); }); //新闻动态特效 $(function(){ $('.news-contxt ul').eq(0).css({top:"0"}); $('.news-nav ul li').click(function(){ var index = $(this).index(); var width = ($(this).outerwidth(true))*(index); $('.news-nav ul li.li-bg').stop().animate({left:width+10},500); $('.news-contxt ul').eq(index).css({top:"0"}).siblings().css({top:"600px"}); }); }); //客户见证特