') //jiaoyu = _this.attr("data-jiaoyu"), //jingli = _this.attr("data-jingli"); text = _this.attr("data-text") $(".dialog-img img").attr("src", avator); $(".dialog-title").text(name); $(".dialog-position").html(positionbr); //$(".dialog-jiaoyu p").text(jiaoyu); //$(".dialog-jingli p").text(jingli); $(".dialog-text").html(text); $(".dialog-container").show(); }) //輪播 var swiper = new Swiper('#swiperId', { navigation: { nextEl: '.swiper-button-next1', prevEl: '.swiper-button-prev1', }, }) var swiper1 = new Swiper('#swiperId1', { navigation: { nextEl: '.swiper-button-next2', prevEl: '.swiper-button-prev2', }, }) //顯示埋沒 var li = document.getElementsByClassName("share-info"); $(".share-info").eq(0).addClass('active1') //for (let i = 0; i < li.length; i++) { // li[i].onmouseenter = function () { // console.log(123) // $(this).addClass('active1').siblings().removeClass('active1'); // } //} //$(".share-list1").on("mouseenter", ".share-info", function () { // $(this).addClass('active1').siblings().removeClass('active1'); //}) //闡發法医病理鉴定師申報法医病理鉴定加載更多 $(".btnMore").on("click", function () { var dataType = $(this).attr("data-type"); var all2 = $(this).parents(".typePage").find(".report-item").length; var show2 = $(".module4").find(".report-item:visible").length; if (all2 - show2 < 3) { $(this).hide(); } for (var j = 0; j < 3; j++) { $(".module4").find(".report-item").eq(j + show2).css({ "display": "block" }); } var show3 = $(".module4").find(".report-item:visible").length; if ((all2 == show3) && (all2 > 2)) { $(this).hide(); $(".btnLittle").show(); } }); //指定位置跳轉 window.onload = function () { var urlParameter, url = window.location.href; urlParameter = url.split("#"); if (urlParameter.length > 1) { urlParameter = url.split("#")[1]; urlParameter = urlParameter.split("&")[0]; urlParameter = urlParameter.split("="); if (urlParameter[0] == "id") { switch (urlParameter[1]) { case "C1": var loacationY = $("#C1").offset().top; window.scrollTo(0, loacationY - 90) break; case "C2": var loacationY = $("#C2").offset().top; window.scrollTo(0, loacationY - 90) break; case "C3": var loacationY = $("#C3").offset().top; window.scrollTo(0, loacationY - 90) break; } } } $("body").on("click", ".footerLeft a", function () { var par, hrefVal = $(this).attr("href"); par = hrefVal.split("#")[1]; par = par.split("&")[0]; par = par.split("="); if (par[0] == "id") { switch (par[1]) { case "C1": var loacationY2 = $("#C1").offset().top; window.scrollTo(0, loacationY2 - 90); break; case "C2": var loacationY2 = $("#C2").offset().top; window.scrollTo(0, loacationY2 - 90); break; case "C3": var loacationY2 = $("#C3").offset().top; window.scrollTo(0, loacationY2 - 90); break; } } }) //導航 $("body").on("click", ".L23 a", function () { var par, hrefVal = $(this).attr("href"); par = hrefVal.split("#")[1]; par = par.split("&")[0]; par = par.split("="); if (par[0] == "id") { switch (par[1]) { case "C1": var loacationY2 = $("#C1").offset().top; window.scrollTo(0, loacationY2 - 90); break; case "C2": var loacationY2 = $("#C2").offset().top; window.scrollTo(0, loacationY2 - 90); break; case "C3": var loacationY2 = $("#C3").offset().top; window.scrollTo(0, loacationY2 - 90); break; } } }) }