$(function(){ //语言切换 $('.language .cn').mouseenter(function(){ $(this).siblings('.lan-list').stop().show(); }) $('.language .cn').mouseleave(function(){ $(this).siblings('.lan-list').stop().hide(); }) $('.language .lan-list').mouseenter(function(){ $(this).stop().show(); }) $('.language .lan-list').mouseleave(function(){ $(this).stop().hide(); }) $('.nav li').mouseenter(function(){ $(this).children('dl').stop(false,true).fadein(); }) $('.nav li').mouseleave(function(){ $(this).children('dl').stop().hide(); }) /*var windoww=$(window).outerwidth(true); var lilength=$('.i-banner li').length; $('.i-banner ul').css({width:100*lilength+'%'}) $('.i-banner li').css({width:windoww})*/ var banner=[]; $('.i-banner li').each(function(){ var src=$(this).find('img').attr('src'); banner.push(src); }) /*_preloadimg(banner,function(){ var imgh = $('.i-banner li a img').height(); $('.i-banner').css({height:imgh}); $(window).resize(function(){ var imgh = $('.i-banner li a img').height(); //var proimgh = $('.i-pro-con img').height(); $('.i-banner').css({height:imgh}); //console.log(proimgh) //$('.i-pro-info').css({height:proimgh-82});//padding-top:82px; }); })*/ var iproimg = []; $('.i-pro-t').each(function(){ var src = $(this).find('img').attr('src'); iproimg.push(src); }) _preloadimg(iproimg,function(){ var proimgh = $('.i-pro-con img').height(); //$('.i-pro-info').css({height:proimgh-82});//padding-top:82px; $('.i-pro-t').css({height:proimgh}); $(window).resize(function(){ var proimgh = $('.i-pro-con img').height(); //$('.i-pro-info').css({height:proimgh-82});//padding-top:82px; $('.i-pro-t').css({height:proimgh}); }); }) //轮播 var length = $('.i-banner li').length; for(i=0;i=lil-11){ //i=-1; return; } i++; $('.his-ul ul').stop().animate({marginleft:-liw*i}) console.log(i) }) $('.his-line .btnl').click(function(){ console.log(i) if(i<=0){ //i=lil-10; return; } i--; $('.his-ul ul').stop().animate({marginleft:-liw*i}) console.log(i) }) // var txt = $('textarea').html(); $('textarea').focus(function(){ $(this).html(' '); console.log(txt) }) $('textarea').blur(function(){ if($(this).html()==' '){ $(this).html(txt); } }) });