$(function () { $('#Marquee_x').jcMarquee({ 'marquee': 'x', 'margin_right': '20px', 'speed': 15 }); // DIVCSS5鎻愮ず锛?0px浠h〃闂磋窛锛岀浜屼釜20浠h〃婊氬姩閫熷害 $("#mod-1").on("click", function () { $(".mod-1").show(); $(".mod-2").hide(); $(".mod-3").hide(); $("#mod-1").addClass('checked'); $("#mod-2").removeClass('checked'); $("#mod-3").removeClass('checked'); var new_height = $("#solution-1").height() + $("#mod-1").height() + $(".mod-1") .height() + 150; $(".s-solution").eq(0).attr("style", "min-height: " + new_height + "px;") }); $("#mod-2").on("click", function () { $(".mod-1").hide(); $(".mod-2").show(); $(".mod-3").hide(); $("#mod-1").removeClass('checked'); $("#mod-2").addClass('checked'); $("#mod-3").removeClass('checked'); var new_height = $("#solution-1").height() + $("#mod-2").height() + $(".mod-2") .height() + 150; console.log("new_height1", $("#solution-1").height()); console.log("new_height2", $("#mod-2").height()); console.log("new_height3", $(".mod-2").height() + 150); $(".s-solution").eq(0).attr("style", "min-height: " + new_height + "px;") }); $("#mod-3").on("click", function () { $(".mod-1").hide(); $(".mod-2").hide(); $(".mod-3").show(); $("#mod-1").removeClass('checked'); $("#mod-2").removeClass('checked'); $("#mod-3").addClass('checked'); var new_height = $("#solution-1").height() + $("#mod-3").height() + $(".mod-3") .height() + 150; $(".s-solution").eq(0).attr("style", "min-height: " + new_height + "px;") }); $("#mod-4").on("click", function () { $(".mod-4").show(); $(".mod-5").hide(); $("#mod-4").addClass('checked'); $("#mod-5").removeClass('checked'); var new_height = $("#solution-2").height() + $("#mod-4").height() + $(".mod-4") .height() + 110; $(".s-solution").eq(1).attr("style", "min-height: " + new_height + "px;") }); $("#mod-5").on("click", function () { $(".mod-4").hide(); $(".mod-5").show(); $("#mod-4").removeClass('checked'); $("#mod-5").addClass('checked'); var new_height = $("#solution-2").height() + $("#mod-5").height() + $(".mod-5") .height() + 1630; $(".s-solution").eq(1).attr("style", "min-height: " + new_height + "px;") }); switch ( getQueryString('id') ) { case '0': $("#mod-1").addClass('checked'); $(".mod-1").show(); $("#mod-5").addClass('checked'); $(".mod-5").show(); var new_height2 = $("#solution-1").height() + $("#mod-1").height() + $(".mod-1") .height() + 150; $(".s-solution").eq(0).attr("style", "min-height: " + new_height2 + "px;") var new_height8 = $("#solution-2").height() + $("#mod-5").height() + $(".mod-5") .height() + 1630; $(".s-solution").eq(1).attr("style", "min-height: " + new_height8 + "px;") // var new_height9 = $("#solution-2").height() + $("#mod-4").height() + $(".mod-4") // .height() + 110; // $(".s-solution").eq(1).attr("style", "min-height: " + new_height9 + "px;") break; case '1': $(".mod-1").hide(); $(".mod-2").show(); $(".mod-3").hide(); $("#mod-1").removeClass('checked'); $("#mod-2").addClass('checked'); $("#mod-3").removeClass('checked'); $("#mod-5").addClass('checked'); $(".mod-5").show(); var new_height1 = $("#solution-1").height() + $("#mod-2").height() + $(".mod-2") .height() + 150; $(".s-solution").eq(0).attr("style", "min-height: " + new_height1 + "px;") var new_height8 = $("#solution-2").height() + $("#mod-5").height() + $(".mod-5") .height() + 1630; $(".s-solution").eq(1).attr("style", "min-height: " + new_height8 + "px;") break; case '2': $(".mod-1").hide(); $(".mod-2").hide(); $(".mod-3").show(); $("#mod-1").removeClass('checked'); $("#mod-2").removeClass('checked'); $("#mod-3").addClass('checked'); $("#mod-5").addClass('checked'); $(".mod-5").show(); var new_height3 = $("#solution-1").height() + $("#mod-3").height() + $(".mod-3") .height() + 150; $(".s-solution").eq(0).attr("style", "min-height: " + new_height3 + "px;") var new_height8 = $("#solution-2").height() + $("#mod-5").height() + $(".mod-5") .height() + 1630; $(".s-solution").eq(1).attr("style", "min-height: " + new_height8 + "px;") break; case '3': $("#mod-1").addClass('checked'); $(".mod-1").show(); $(".mod-4").hide(); $(".mod-5").show(); $("#mod-4").removeClass('checked'); $("#mod-5").addClass('checked'); var new_height4 = $("#solution-2").height() + $("#mod-5").height() + $(".mod-5") .height() + 70; $(".s-solution").eq(0).attr("style", "min-height: " + new_height4 + "px;") var new_height8 = $("#solution-2").height() + $("#mod-5").height() + $(".mod-5") .height() + 1630; $(".s-solution").eq(1).attr("style", "min-height: " + new_height8 + "px;") break; case '4': $("#mod-1").addClass('checked'); $(".mod-1").show(); $(".mod-4").show(); $(".mod-5").hide(); $("#mod-4").addClass('checked'); $("#mod-5").removeClass('checked'); var new_height5 = $("#solution-2").height() + $("#mod-4").height() + $(".mod-4") .height() + 450; $(".s-solution").eq(0).attr("style", "min-height: " + new_height5 + "px;") var new_height8 = $("#solution-2").height() + $("#mod-5").height() + $(".mod-4") .height() + 100; $(".s-solution").eq(1).attr("style", "min-height: " + new_height8 + "px;") break; default: $("#mod-1").addClass('checked'); $(".mod-1").show(); $("#mod-5").addClass('checked'); $(".mod-5").show(); var new_height6 = $("#solution-1").height() + $("#mod-1").height() + $(".mod-1") .height() + 150; $(".s-solution").eq(0).attr("style", "min-height: " + new_height6 + "px;") var new_height8 = $("#solution-2").height() + $("#mod-5").height() + $(".mod-5") .height() + 1630; $(".s-solution").eq(1).attr("style", "min-height: " + new_height8 + "px;") break; } // var new_height = $("#solution-1").height() + $("#mod-1").height() + $(".mod-1").height() + 150; // $(".s-solution").eq(0).attr("style", "min-height: " + new_height + "px;") // var new_height7 = $("#solution-2").height() + $("#mod-5").height() + $(".mod-5").height() + 1200; // $(".s-solution").eq(1).attr("style", "min-height: " + new_height7 + "px;") }) // mobile瑙e喅鏂规灞曠ず $(function () { $("#solution-list").on("click", ".liname", function (index) { var index = $("#solution-list .liname").index(this); $("#solution-list>li>.child_menu").eq(index).slideToggle(); $("#solution-list>li>.child_menu").eq(index).parent().siblings("li").find(".child_menu") .slideUp(); }); }); function to(params) { $('html,body').animate({ scrollTop: $('#solution-2').offset().top }, { duration: 500, easing: "swing" }); switch (params) { case '3': $("#mod-1").addClass('checked'); $(".mod-1").show(); $(".mod-4").hide(); $(".mod-5").show(); $("#mod-4").removeClass('checked'); $("#mod-5").addClass('checked'); var new_height8 = $("#solution-2").height() + $("#mod-5").height() + $(".mod-5") .height() + 1630; $(".s-solution").eq(1).attr("style", "min-height: " + new_height8 + "px;") break; case '4': $("#mod-1").addClass('checked'); $(".mod-1").show(); $(".mod-4").show(); $(".mod-5").hide(); $("#mod-4").addClass('checked'); $("#mod-5").removeClass('checked'); var new_height9 = $("#solution-2").height() + $("#mod-4").height() + $(".mod-4") .height() + 110; $(".s-solution").eq(1).attr("style", "min-height: " + new_height9 + "px;") console.log("鎴戞槸mode4", new_height9); break; default: break; } }