/** * tabs * @return */ function tabs(tabtitle,tab_content,event,fun){ var nowarry=[] $(tabtitle).each(function(index){ var aaa=index $(this).children().each(function(index){ if($(this).hasclass("hover")){ nowarry.push(index); } $(this).bind(event,function(){ var index=$(this).index(); $(this).addclass("hover").siblings().removeclass("hover"); $(tab_content).eq(aaa).children().eq(index).show().siblings().hide(); if(typeof fun=="function" && fun!=""){ fun() } }); }) }) $(tab_content).each(function(index){ $(this).children().eq(nowarry[index]).show().siblings().hide() }); }; //图片等比缩放 function scaleimg(){ $(".scalebox").each(function(){ $(this).find("img").jqthumb({ width: $(this).outerwidth(), height: $(this).outerheight(), after: function(imgobj){ imgobj.css('opacity', 1).animate({opacity: 1},1000); } }); }) } //wow 同一行 元素延迟加载 function wowdelay(box,row,delaytime){ $(box).children().each(function(index){ for(var i = 0;i3){ $(".rmtslide .bt").show(); $(".rmtslide").slide({ titcell:".hd ul", maincell: ".bd dl", autopage:true, autoplay:true, //自动播放 effect:"leftloop", //左循环滚动 fold:淡入淡出 toploop:上循环滚动; leftloop:左循环滚动; delaytime: 1000, //切换时间 intertime: 3000, //切换间隔 trigger: "click", prevcell: ".prev", nextcell: ".next", //scroll:2, vis:3 }); } /*锚点动画*/ $('a[href*=#],area[href*=#]').click(function() { if (location.pathname.replace(/^\//, '') == this.pathname.replace(/^\//, '') && location.hostname == this.hostname) { var $target = $(this.hash); $target = $target.length && $target || $('[name=' + this.hash.slice(1) + ']'); if ($target.length) { var targetoffset = $target.offset().top; $('html,body').animate({ scrolltop: targetoffset - 80 }, 1000); return false; } } }); }); $(window).resize(function(){ }); $(window).load(function(){ //内页导航 配合menu.jsp使用 scaleimg();//图片等比缩放 //首页新闻选项卡 tabs('.ind1stl_tab','.ind1sttab','.ind1stltabmore','hover'); //业务 $(".business").slide({ //titcell:".hd ul", maincell: ".bd dl", autopage:false, autoplay:true, //自动播放 effect:"leftloop", //左循环滚动 fold:淡入淡出 toploop:上循环滚动; leftloop:左循环滚动; delaytime: 1000, //切换时间 intertime: 4000, //切换间隔 trigger: "click", prevcell: ".prev", nextcell: ".next", //scroll:2, vis:4 }); $(".renovation").slide({ titcell:".hd ul", maincell: ".bd dl", autopage:true, autoplay:true, //自动播放 effect:"fold", //左循环滚动 fold:淡入淡出 toploop:上循环滚动; leftloop:左循环滚动; delaytime: 1500, //切换时间 intertime: 3000, //切换间隔 trigger: "click", prevcell: ".prev", nextcell: ".next", startfun(i){ var dataimg = $('.renova_dl dd').eq(i).find('a').attr('data-img'); $('.renbg').css({ opacity: 0, background: 'url('+dataimg+') no-repeat left center' }).stop(true,true).animate({ opacity: 1 },1500); $('.renova_dl dd').eq(i).addclass('on').animate({ opacity: 1 },1500); $('.renova_dl dd').eq(i).siblings().removeclass('on').animate({ opacity: 0 },1500);; } }); //导航 配合menu.jsp使用 // $(".submenu_dl").menu({ // type:1,//0--无滑块(默认);1--有滑块 // height:3,//滑块高度 // background:"#1d6ea6",//滑块背景色 // bottom:0,//滑块距离导航底部距离 // animateease:"easeoutbounce",//滑块的运动轨迹 // time:800,//滑块的运动时间 // zindex:-1,//滑块的层级 // margin:0,//滑块左右间距 // antcomplete:true,//滑块动画完成后调函数(默认) // startfun:function(i){//滑块进入后回调方法 // // }, // endfun:function(i){//滑块离开后回调方法 // // } // }); });