// jquery(".index-banner").slide({ titcell: ".hd li", maincell: ".bd ul", effect: "fold", autoplay: true, delaytime: "1200", intertime: "10000", mouseoverstop: false,/* 鼠标移到容器层继续播放*/ /* 控制进度条 */ startfun: function () { var timer = jquery(".index-banner .timer"); timer.stop(true, true).animate({ "width": "0%" }, 0).animate({ "width": "100%" }, 10000); }, /* 控制图片放大和文字动画 */ endfun: function (i, c) { jquery(".index-banner .tit").css({ "top": "55%", "opacity": 0 }).eq(i).animate({ "top": "50%", "opacity": 1 }); jquery(".index-banner a").css({ "transform": "scale(1)", 'transition': 'transform 5s' }).eq(i).css({ "transform": "scale(1.1)" }); } }); //产品体系 $(function () { //切换 var navli = $(".core-nav li"); navli.click(function () { var thisnavli = $(this); var category_id = $(this).attr("data-id"); var channel_id = $(this).attr("data-channel_id"); //$(".moreall").attr("href", "/product/" + category_id); $(".moreall").attr("href", "/public/" + channel_id + "/" + category_id); var t = thisnavli.index(); thisnavli.addclass("on"); thisnavli.siblings("li").removeclass("on"); $.ajax({ type: "post", url: "/cgi/articlelist", data: { channel_id: 25 , category_id: category_id , top: 5 }, success: function (msg) { var data = json.parse(msg); $(".listdata").html(""); if (data.data.length > 0) { for (var i = 0; i < data.data.length; i++) { var sb_product = "
  • "; sb_product = sb_product + "

    "; sb_product = sb_product + "
    "; sb_product = sb_product + "
    "; sb_product = sb_product + "
    " + data.data[i].title + "
    "; sb_product = sb_product + "
    "; sb_product = sb_product + "

    "; sb_product = sb_product + "
    "; sb_product = sb_product + "
    "; sb_product = sb_product + "

    " + data.data[i].title + "

    "; sb_product = sb_product + "

    " + data.data[i].zhaiyao + "

    "; sb_product = sb_product + "
    "; sb_product = sb_product + "
  • "; $(".listdata").append(sb_product); } if ($(window).outerwidth() > 768) { $(".corelist li").hover( function () { $(".corelist li").removeclass("hover"); $(this).addclass("hover"); } ) } } } }); }); navli[0].click(); }) //合作伙伴切换 $(function () { $(".link-nav li").click(function () { $(this).addclass("on"); $(this).siblings("li").removeclass("on"); $(".link_children").hide(); if ($(this).attr("load-data") == "0") { load_link($(this).attr("data-id")); $(this).attr("load-data", "1"); } $("#link_box" + $(this).attr("data-id")).show(); }); $(".link-nav li").each(function () { $("#link_content").append(""); }); //延迟模拟点击,节省页面加载并发数,因为再页面的底部,浏览器还没这么快进来 settimeout(function () { $(".link-nav li")[0].click(); }, 1500); }); function load_link(_id) { $.ajax({ type: "post", url: "/cgi/articlelist", data: { channel_id: 28 , category_id: _id , top: 30 }, success: function (msg) { var data = json.parse(msg); $("#link_box" + _id).html(""); if (data.data.length > 0) { for (var i = 0; i < data.data.length; i++) { $("#link_box" + _id).append("

    \""

    "); } } } }); }