/** * created by administrator on 2017/4/12 0012. */ $(function () { $("#demo").fullpage( { navigation: true, navigationposition: 'right', navigationtooltips: ['首页', '最新报道', '现场图片', '设备展示', '关于我们'], scrollingspeed: 1000, css3: true, // scrollbar:true, // setautoscrolling:false afterload: function (anchorlink, index) { var width = screen.width; if(width>768){ if (index == 2) { $('.section2').find('.container').animate({ left: '0' }, 1500, 'easeoutexpo'); } if (index == 3) { $('.section3').find('.container').animate({ bottom: '0' }, 1500, 'easeoutexpo'); } if (index == 4) { $('.section4').find('.big_pic').fadein(2000); } if (index == 5) { $('.section5').find('.container').animate({ bottom: '0' }, 1500, 'easeoutexpo'); } } else{ $(".section2 .container").css("left","0"); $(".section3 .container").css("bottom","0"); $(".section4 .big_pic").css("display","block"); $(".section5 .container").css("bottom","0"); } } }); setinterval(function () { $.fn.fullpage.moveslideright(); }, 8000); var width = screen.width; if (width < 768) { $("div.slide img").attr("style", "width:65%"); $("#slide1 img").attr("src","skin/beijingzt/images/160_s.png"); $("#slide2 img").attr("src","skin/beijingzt/images/200_s.png"); $("#slide3 img").attr("src","skin/beijingzt/images/300_s.png"); $("#slide4 img").attr("src","skin/beijingzt/images/850_s.png"); $("#slide5 img").attr("src","skin/beijingzt/images/sfullcolor_s.png"); $("#slide6 img").attr("src","skin/beijingzt/images/svd_s.png"); $("p.news").css("display", "none"); $(".fp-slidesnav ul li a span").css("background","url(skin/beijingzt/images/160s.png) no-repeat center center"); $(".fp-slidesnav ul li:nth-child(2) a span").css("background","url(skin/beijingzt/images/200s.png) no-repeat center center"); $(".fp-slidesnav ul li:nth-child(3) a span").css("background","url(skin/beijingzt/images/300s.png) no-repeat center center"); $(".fp-slidesnav ul li:nth-child(4) a span").css("background","url(skin/beijingzt/images/850s.png) no-repeat center center"); $(".fp-slidesnav ul li:nth-child(5) a span").css("background","url(skin/beijingzt/images/fullcolors.png) no-repeat center center"); $(".fp-slidesnav ul li:last-child a span").css("background","url(skin/beijingzt/images/vds.png) no-repeat center center"); $("a.newscenter").attr("href","http://m.hwatec.com/e/action/listinfo/?classid=6"); $("a.aboutus").attr("href","http://m.hwatec.com/m_about.html"); $(".top p.pic").click(function(){location.href="http://m.hwatec.com/e/action/showinfo.php?classid=6&id=178"}); $(".top .pic1 a").attr("href","http://m.hwatec.com/e/action/showinfo.php?classid=6&id=178"); $(".top .pic2 a").attr("href","http://m.hwatec.com/e/action/showinfo.php?classid=6&id=183"); $(".top .pic3 a").attr("href","http://m.hwatec.com/e/action/showinfo.php?classid=6&id=184"); $("#index").attr("href","http://m.hwatec.com/index.php"); $("#products").attr("href","http://m.hwatec.com/m_pr160.html"); $("#server").attr("href","http://m.hwatec.com/m_jcfw.html"); $("#customers").attr("href","http://m.hwatec.com/m_maker.html"); $("#link").attr("href","http://m.hwatec.com/m_tel.html"); }else if(width <=1600&&width>=1440){ //判断为ie11 if (!!window.activexobject || "activexobject" in window){ $("#bottom").css("bottom", "-4%"); } } $("div.fp-controlarrow.fp-prev").hover(function(){ $(this).css("background","url(skin/beijingzt/images/arror_left.png) no-repeat center center"); },function(){ $(this).css("background","url(skin/beijingzt/images/left.png) no-repeat center center"); }) $("div.fp-controlarrow.fp-next").hover(function(){ $(this).css("background","url(skin/beijingzt/images/arror_right.png) no-repeat center center"); },function(){ $(this).css("background","url(skin/beijingzt/images/right.png) no-repeat center center"); }) })