$(document).ready(function () { var tuh2 = $(".slider ul li img").height(); $(".slider ul li img").css("height", tuh2); $(".slider-box").css("height", tuh2); }); $(".slider-box").hover( function () { $(".btn_bj").show(); }, function () { $(".btn_bj").hide(); } ); var $slider = $(".slider ul"); var $slider_li = $(".slider ul li"); var $slider_xiao = $(".slider").width(); var $slider_child_l = $(".slider ul li").length; var $slider_width = $(".slider ul li").width(); var $slider_img = $(".slider ul li img").width(); $slider.width($slider_child_l * $slider_width); //$slider_li.width($slider_img-30); var slider_count = 0; if ($slider_child_l <= 1) { $("#btn-right").css({ cursor: "auto" }); $("#btn-right").addClass("dasabled"); } $("#btn-right").click(function () { if ($slider_child_l <= 1 || slider_count >= $slider_child_l - 1) { return false; } slider_count++; $slider.animate({ left: "-=" + $slider_width + "px" }, "slow"); slider_pic(); }); $("#btn-left").click(function () { if (slider_count <= 0) { return false; } slider_count--; $slider.animate({ left: "+=" + $slider_width + "px" }, "slow"); slider_pic(); }); function slider_pic() { if (slider_count >= $slider_child_l - 1) { // $('.rgbd').css({ cursor: 'auto' }); $("#btn-right").addClass("dasabled"); // $('#btn-left').css({ cursor: 'pointer' }); $("#btn-left").removeClass("dasabled"); } else if (slider_count > 0 && slider_count <= $slider_child_l - 1) { //$('#btn-right').css({ cursor: 'pointer' }); $("#btn-right").removeClass("dasabled"); // $('#btn-left').css({ cursor: 'pointer' }); $("#btn-left").removeClass("dasabled"); } else if (slider_count <= 0 && slider_count <= $slider_child_l - 1) { // $('#btn-left').css({ cursor: 'auto'}); $("#btn-left").addClass("dasabled"); // $('#btn-right').css({ cursor: 'pointer' }); $("#btn-right").removeClass("dasabled"); } } $(".slider a").hover( function () { if ($(this).find("img:animated").length) return; $(this).animate({ marginTop: "0px" }, 200); //$(this).find('img').animate({ width: '70px' }, 200); }, function () { $(this).animate({ marginTop: "0" }, 200); //$(this).find('img').animate({ width: '70px' }, 200); } ); $("#tab-xgzt li").hover(function () { $(this).addClass("on").siblings().removeClass("on"); $(this) .parent() .siblings(".item-box") .removeClass("on") .eq($(this).index()) .addClass("on"); }); $('.bl-box #tab-item li').hover(function () { $(this).addClass('on').siblings().removeClass('on'); $('.bl-box .item-box').removeClass('on').eq($(this).index()).addClass('on'); }) $('.hot-box #tab-item2 li').hover(function () { $(this).addClass('on').siblings().removeClass('on'); $('.hot-box .hot-item').addClass('hide').eq($(this).index()).removeClass('hide'); }) function select_change(obj, shid) { var fl = $(obj).attr("data"); var hid = 1; if (fl == 1) hid = 2; $(obj).attr("data", hid); $("#" + shid + fl).removeClass("hide"); $("#" + shid + hid).addClass("hide"); } $(function () { function tool() { } tool.prototype.downdecail = { scroll: function () { var iheadTop = $(".tab-nav").offset().top; $(window).on("scroll", function () { var itop = $(this).scrollTop(); if (itop >= iheadTop) { $(".g-bottom-banner").removeClass("none"); $(".tab-nav").addClass("fixed"); } else { $(".g-bottom-banner").addClass("none"); $(".tab-nav").removeClass("fixed"); } }); // $('#sNavTop').on('click', function () { // $(window).scrollTop(0); // }); }, downdecailHeads: function () { $(".software-info .u-btn-ben").on("click", function (event) { // var flag = $(this).attr("href").indexOf("javascript"); var tempTop = 0; if ($('.xgzt-box').length>0 ) { var b = $(".xgzt-box").offset().top; tempTop = b + 176; } else { tempTop = $(".xzdz-box").offset().top; } $(window).scrollTop(tempTop); event.preventDefault(); }); $(".g-bottom-banner .u-btn-ben").on("click", function (event) { var tempTop = 0; if ($('.xgzt-box').length>0 ) { var b = $(".xgzt-box").offset().top; tempTop = b + 176; } else { tempTop = $(".xzdz-box").offset().top; } $("body,html").animate({ scrollTop: tempTop }, 500); return false; }); }, init: function () { this.scroll(); this.downdecailHeads(); }, }; var atool = new tool(); atool.downdecail.init(); $(".tab-nav li").on("click", function () { $(this).addClass("on").siblings().removeClass("on"); var $tabtop = $("." + $(this).data("name")).offset().top - 56; if ($(this).data("name") == "xzdz-box") { if($('.xgzt-box').length > 0){ $tabtop = $(".xgzt-box").offset().top + 176; } else{ $tabtop = $(".xzdz-box").offset().top; } } $("html,body").animate( { //$('html,body')兼容问题body属于chrome scrollTop: $tabtop, }, 500 ); }); }); // 电脑内容页软件介绍文章的样式实现 $(document).ready(function () { var strong2 = $(this).find(".rjjs-box"); if (strong2.length == 0) { return; } var strong = $(this).find(".rjjs-box strong"); for (var j = 0; j < strong.length; j++) { if (strong[j].innerHTML.indexOf("
") != -1) { var checkStrongBr = strong[j].innerHTML.replace(//gi, ""); strong[j].innerHTML = checkStrongBr; } if (strong[j].innerHTML != "") { $(strong[j]).addClass("dnrj_pane"); $('').prependTo($(strong[j]).parent()); $(strong[j]).parent().css({ "border-bottom": " 1px solid #dcd4d4", "font-size": "16px", color: "#333", }); } } var th_content = strong2.html().replace(//gi, "

"); strong2.html(th_content); var strong3 = $(this).find(".rjjs-box>strong"); for (var l = 0; l < strong3.length; l++) { if (strong3[l].innerHTML != "" && strong3[l].innerHTML != "小编推荐") { $(strong3[l]).addClass("dnrj_pane"); $('').prependTo($(strong3[l])); $(strong3[l]).css({ "border-bottom": " 1px solid #dcd4d4", "font-size": "16px", color: "#333", width: "100%", display: "inline-block", "padding-bottom": "3px", }); } } var strong1 = $(this).find(".rjjs-box p b"); for (var k = 0; k < strong1.length; k++) { if (strong1[k].nextSibling == null && strong1[k].innerHTML != "") { $(strong1[k]).addClass("dnrj_pane"); $('').prependTo($(strong1[k]).parent()); $(strong1[k]).parent().css({ "border-bottom": " 1px solid #dcd4d4", "font-size": "16px", color: "#333", }); } } });