function addFavorite2() { var url = window.location; var title = document.title; var ua = navigator.userAgent.toLowerCase(); if (ua.indexOf("360se") > -1) { alert("由于360浏览器功能限制,请按 Ctrl+D 手动收藏!"); } else if (ua.indexOf("msie 8") > -1) { window.external.AddToFavoritesBar(url, title); //IE8 } else if (document.all) { try { window.external.addFavorite(url, title); } catch (e) { alert('您的浏览器不支持,请按 Ctrl+D 手动收藏!'); } } else if (window.sidebar) { window.sidebar.addPanel(title, url, ""); } else { alert('您的浏览器不支持,请按 Ctrl+D 手动收藏!'); } }; $(".menu ul li").hover( function(){$(this).children("p").slideDown();}, function(){$(this).children("p").slideUp();} ); jQuery(".fullSlide").slide({ titCell:".hd li", mainCell:".bd ul", effect:"fold", autoPlay:true, delayTime:700 }); function searchInfo() { var key = document.getElementById("key").value; if (key) { location.href = "search.php?key=" + key; } else { alert('请输入您要搜索的关键词!'); } } jQuery(".pro").slide({titCell:"em", targetCell:"ul",titOnClassName:"on",defaultIndex:0,effect:"slideDown",delayTime:300}); $('.slbj').slide({mainCell:".pp",autoPlay:true,effect:"leftMarquee",vis:5,interTime:20,trigger:"click"}); $(".slbj").slide({titCell:".h li",mainCell:".tgs",titOnClassName:"on"}); $('.qcdwbj').slide({ mainCell:".cpzs", autoPlay:true, /*是否自动切换, 不需要删除即可*/ interTime:1500, /*配合自动切换使用, 自动切换间隔*/ effect:"leftLoop",/*滚动效果,向左滚动*/ vis: 5, /*每次显示的个数,默认为一个*/ scroll:1, prevCell: '.prev',/*上一页箭头, class名与html结构中保持一致*/ nextCell: '.next'/*下一页箭头, class名与html结构中保持一致*/ }); jQuery(".qyhh").slide({titCell:".sbx ul li",mainCell:".sbx_1",titOnClassName:"on"}); jQuery(".xzcbj").slide({titCell:".xwzx span a",mainCell:".xzc_cent",effect:"leftLoop",autoPlay:"false",scroll:1,vis:1,trigger:"mouseover"}); jQuery(".cjwd").slide({titCell:"",mainCell:".bd",effect:"leftLoop",autoPlay:"true",scroll:1,vis:1}); $(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({ left: 77-maxWidth }, '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({ left: 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"); } }); });