.591cctv.com/static/image/green1.png") left bottom no-repeat'); $('.othercolor').css('background','#78cf1b'); break; case '8': $('.float-kf').css('display','block'); break; case '9': $('.float-kf').css('display','none'); $('.kf-switch').css('display','block'); break; } } var _windowScrollTop=0; //滚动条距离顶端距离 var _windowWidth=$(window).width(); //窗口宽度 $(window).scroll(actionEvent).resize(actionEvent); //监听滚动条事件和窗口缩放事件 //响应事件 function actionEvent(){ _windowScrollTop = $(window).scrollTop(); //获取当前滚动条高度 // _windowWidth=$(window).width();//获取当前窗口宽度 moveQQonline();//移动面板 } //移动面板 function moveQQonline(){ //.stop()首先将上一次的未完事件停止,否则IE下会出现慢速僵死状态,然后重新设置面板的位置。 $(".kf").stop().animate({ top: _windowScrollTop+100 }, "fast"); $('.alignCenter').stop().animate({ top: _windowScrollTop+133 }, "fast"); $(".kf-switch").stop().animate({ top: _windowScrollTop+100 }, "fast"); $(".float-kf").stop().animate({ top: _windowScrollTop+100 }, "fast"); } $(".kf_btn").toggle( function() { $('.open').addClass('close'); $('.alignCenter').hide(); $(".kf_main").animate({width:'hide',opacity:'hide'},'normal',function(){ $(".kf_main").hide(); var href=""; if(href==""){ $(".code").css("display","none"); }else{ $('.e_code img').animate({width:'hide',opacity:'hide'}); } }); }, function(){ $('.open').removeClass('close'); $(".kf_main").animate({opacity:'show'},'normal',function(){ $(".kf_main").show(); var href=""; if(href==""){ $(".code").css("display","none"); }else{ $('.e_code img').animate({opacity:'show'}); } }); } ); $('#hidden_share').click(function(){ $('.alignCenter').show(); }) $('.alignCenter .title img').click(function(){ $('.alignCenter').hide(); })