/* * 自定义js方法 * * @author : minuery * @email : 251974526@qq.com * copyright 2015 minuery */ $(document).ready(function(e) { //延时加载动画插件配置 var wow = new wow({ boxclass: 'mx', animateclass: 'animated', offset: 0, mobile: true, live: true }); wow.init(); //返回头部 $('#gotop').totop(); //手机返回头部 $(".gotop").click( function () { $("html,body").animate({scrolltop:"0px"},1000) } ) //延时加载图片 $("body img").each(function(index, element) { $(this).addclass("lazy"); $(this).attr("data-original",$(this).attr("src")); }); }); //选项卡 function xxk(tabtit,tab_conbox,shijian,select){ // $(tab_conbox).find("li").hide(); // $(tabtit).find("li:first").addclass(select).show(); $(tabtit).find("li:first").show(); // $(tab_conbox).find("li:first").show(); $(tabtit).find("li").bind(shijian,function(){ $(this).addclass(select).siblings("li").removeclass(select); var activeindex = $(tabtit).find("li").index(this); $(tab_conbox).children().eq(activeindex).show().siblings().hide(); return false; }); } //验证码刷新 function newgdcode(obj,url) { obj.src = url+ '&nowtime=' + new date().gettime();//后面传递一个随机参数,否则在ie7和火狐下,不刷新图片 }