123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107 |
- $(function(){
- /*导航触发*/
- $(".header-menu > ul > li").hover(function() {
- $(this).find(".sub-menu-ul").slideDown(600, 'easeOutBack');
- },function() {
- $(this).find(".sub-menu-ul").slideUp(300, 'easeInOutBack');
- });
- /*search*/
- $('.header-share ul li').eq(0).hover(function(){
- $(this).find('.search').stop().animate({'width':'309px','border-width':'1px'},325);
- },function(){
- $(this).find('.search').stop().animate({'width':'0px','border-width':'0px'},325);
- });
- $('.menu-icon').click(function() {
- if ($(".header-right").css('display') == 'none') {
- $(".header-right").stop().slideDown(650, 'easeOutQuart');
- $('.header-menu > ul > li').addClass('header-li-show');
- $(this).addClass('on');
- } else {
- $(".header-right").stop().slideUp(350, 'easeInQuad');
- $('.header-menu > ul > li').removeClass('header-li-show');
- $(this).removeClass('on');
- }
- });
- var winW = $(window).width();
- if (winW < 768) {
- $(".footer-menu > ul > li").click(function(){
- if ($(this).find(".menu-warp").css('display') == 'none') {
- $(this).find(".menu-warp").stop().slideDown(600, 'easeOutBack');
- $(this).addClass('move');
- } else {
- $(this).find(".menu-warp").stop().slideUp(800, 'easeInOutBack');
- $(this).removeClass('move');
- }
- });
- $('.code-txt').click(function(){
- if($(this).parent().find('.code-img').css('display') == 'none'){
- $(this).parent().find('.code-img').fadeIn();
- }else{
- $(this).parent().find('.code-img').hide();
- }
- });
- }
- });
- var top = window.screen.height / 2 - 250;
- var left = window.screen.width / 2 - 300;
- var winW = $(window).width(),
- winH = $(window).height();
- /*title是标题,rLink链接,summary内容,site分享来源,pic分享图片路径,分享到新浪微博*/
- function shareTSina(title, rLink, site, pic) {
- title = "智慧云创安全,我想了解更多!";
- // pic = $(".p-img img").attr("src");
- rLink = window.location.href;
- site = window.location.href;
- window.open("http://service.weibo.com/share/share.php?&title=" + encodeURIComponent(title.replace(/ /g, " ").replace(/<br \/>/g, " ")) + "&url=" + encodeURIComponent(rLink), "分享至新浪微博", "height=500,width=600,top=" + top + ",left=" + left + ",toolbar=no,menubar=no,scrollbars=no, resizable=no,location=no, status=no");
- }
- /*分享到facebook*/
- function shareFB(title, rLink, summary, site, pic) {
- title = "智慧云创安全,我想了解更多!";
- rLink = window.location.href;
- site = window.location.href;
- window.open('http://www.facebook.com/sharer.phpu=' + encodeURIComponent(location.href) + '&site=' + encodeURIComponent(site), '_blank', 'scrollbars=no,width=600,height=450,left=' + left + ',top=' + top + ',status=no,resizable=yes');
- }
- // 腾讯微博
- function shareToWb(title, rLink, site, pic) {
- title = "智慧云创安全,我想了解更多!";
- rLink = window.location.href;
- site = window.location.href;
- window.open('http://v.t.qq.com/share/share.php?url=' + encodeURIComponent(rLink) + '&title=' + encodeURI(title) + '&appkey=' + encodeURI(site), '_blank', 'scrollbars=no,width=600,height=450,left=' + left + ',top=' + top + ',status=no,resizable=yes');
- }
- /*分享到qq空间*/
- function shareQzone(title, rLink, summary, site, pic) {
- title = "智慧云创安全,我想了解更多!";
- rLink = window.location.href;
- summary = "智慧云创安全,我想了解更多!";
- site = window.location.href;
- window.open('http://sns.qzone.qq.com/cgi-bin/qzshare/cgi_qzshare_onekey?title=' + encodeURIComponent(title) + '&url=' + encodeURIComponent(rLink) + '&summary=' + encodeURIComponent(summary) + '&site=' + encodeURIComponent(site), '_blank', 'scrollbars=no,width=600,height=450,left=' + left + ',top=' + top + ',status=no,resizable=yes');
- }
- // QRcode
- $(function () {
- // project
- $(".project-type").on("click", "li", function () {
- var index = $(".project-type>li").index(this);
- $(this).siblings("li").removeClass("active");
- $(this).addClass("active");
- $(".project-board>ul").hide();
- $(".project-board>ul").eq(index).show();
- })
- });
|