//--------------无图图像 var nullimg = '../images/error.png'; function lod(t) { t.onerror = null; t.src = nullimg; } $(function () { $(".ratio-img").each(function () { if ($(this).attr("src") == "") { $(this).attr({ "src": nullimg }) } }) }) //end $(function () { wowInt(); phoneTargetSelf(); }) //--------------添加入场动画 function wowInt(){ if (!(/msie [6|7|8|9]/i.test(navigator.userAgent))){ var wow = new WOW({ boxClass: 'wow', animateClass: 'animated', offset: -100,//元素的位置露出后距离底部多少像素执行 mobile: false, live: true }); wow.init(); }; } //end //--------------手机端链接改为本窗口打开 function phoneTargetSelf(context){ if ($(window).width()<1024) { if(context==undefined){ context=$(document); } $('a',context).each(function(){ var target=$(this); var link=target.attr('target'); target.attr('target','_self'); }) } } //end $(document).ready(function(){ //关于我们li高度一致 $(window).resize(function(){ var max_height=0; $('.about_area02 li').height("auto"); $('.about_area02 li').each(function(){ if($(this).height() > max_height){ max_height = $(this).height(); } }) $('.about_area02 li').height(max_height); }) $(window).resize(); //字号 $('.font_size #small').addClass("on").siblings().removeClass("on"); $(document).on("click",".font_size a",function(){ $(this).addClass('on').siblings().removeClass('on'); }) $('a#big').click(function () { $('.news_article').css({ 'font-size': '18px', 'line-height': '2' }); }) $('a#middle').click(function () { $('.news_article').css({ 'font-size': '16px', 'line-height': '1.8' }); }) $('a#small').click(function () { $('.news_article').css({ 'font-size': '14px', 'line-height': '1.8' }); }) })