$(function () { // header $(window).scroll(function () { var oheight = $(window).scrolltop(); if (oheight > 219) { $('.header_nav').addclass('nav01') } else { $('.header_nav').removeclass('nav01') } }) }); $(function () { $('.erji').each(function () { var len = $(this).find('li').length; if (len > 0) { $(this).parent('li').addclass("add"); } }) $(".menu>ul>li.add").mouseover(function () { $(this).children(".erji").show(); }).mouseout(function () { $(this).children(".erji").hide(); }); }); $(function() { var time; //var winheight = top.window.document.body.clientheight || $(window.parent).height(); $('.client-2').css({ 'margintop': -($('.client-2').height() / 2) }); $('#client-2 li').on({ 'mouseenter': function() { var scope = this; time = settimeout(function() { var divdom = $(scope).children('div'); var maxwidth = divdom.width(); $(scope).stop().animate({ right: maxwidth-77}, 'normal', function() { var pic = $(scope).find('.my-kefu-weixin-pic'); if (pic.length > 0) { pic.show(); } }); }, 100) }, 'mouseleave': function() { var pic = $(this).find('.my-kefu-weixin-pic'); var divdom = $(this).children('div'); var maxwidth = divdom.width(); if (pic.length > 0) { pic.hide(); } cleartimeout(time); var divdom = $(this).children('div'); $(this).stop().animate({ right: 0 }, "normal", function() {}); } }); //���ض��� $(window).scroll(function() { var scrolltop = document.documentelement.scrolltop || window.pageyoffset || document.body.scrolltop; var eltop = $("#client-2").find(".my-kefu-ftop"); if (scrolltop > 0) { eltop.show(); } else { eltop.hide(); } }); $("#client-2").find(".my-kefu-ftop").click(function() { var scrolltop = document.documentelement.scrolltop || window.pageyoffset || document.body.scrolltop; if (scrolltop > 0) { $("html,body").animate({ scrolltop: 0 }, "slow"); } }); });