jQuery(".slideBox_cyh").slide({ mainCell: ".bd ul", autoPlay: true, }); jQuery(".ddjs_ad_slideBox_cyh").slide({ mainCell: ".bd ul", autoPlay: true, }); jQuery(".picScroll-left-ddjs").slide({ titCell: ".hd ul", mainCell: ".bd ul", autoPage: true, effect: "left", autoPlay: false, vis: 3, trigger: "click" }); jQuery(".gywm_zzry-left").slide({ titCell: ".hd ul", mainCell: ".bd ul", autoPage: true, effect: "left", autoPlay: true, vis: 3, trigger: "click" }); jQuery(".qywh_slideBox").slide({ mainCell: ".bd ul", autoPlay: true }); jQuery(".zgs_cyh_slideTxt").slide(); $(function() { var f = 0; var d = 222; var a = $(".timer-cyh-scale-cont").length, c; if (window.screen.width > 1160) { c = a - 4 } else { if (window.screen.width < 1160) { c = a - 3 } } $(".timer-cyh-left").on("click", function() { if (f > 0) { f -= 1; b(f, c) } e(f) }); $(".timer-cyh-right").on("click", function() { if (f < a - 1) { f += 1; e(f) } b(f, c) }); $(".time-circle").each(function(g) { $(this).on("click", function() { f = g; b(f, c); e(f) }) }); function e(g) { $(".timer-cyh-scale-cont").eq(g).addClass("hov").siblings().removeClass("hov"); $(".shaft-cyh-detail-cont").eq(g).show().siblings().hide() } function b(h, g) { if (h < g) { moveLeft = -h * d; $(".timer-cyh-scale").animate({ left: moveLeft }, 700) } } });