$(document).ready(function () { //判断是否存在ul $(".wc-menu li:has(ul)").hover(function () { //$(this) 代表.navmenu li $(this).children("a").addClass("move"); if ($(this).find("li").length > 0) { //显示下拉菜单 $(this).children("div").stop(true, false).show() } }, function () { $(this).children("a").removeClass("move"); //隐藏下拉菜单 $(this).children("div").stop(true, false).hide() }); }); $(".wp_subcolumn_list .wp_sublist .sublist_title a").attr("href","javascript:;") $(".possplit").text("/"); //改名为英文面包屑 //$(".nav-path a").eq(0).text("Home"); $(".intro").each(function (k, v) { $(v).html($(v).text()) }) $(".intro-p p").each(function (k, v) { $(v).html($(v).text()) }) $(".introp p").each(function (k, v) { $(v).html($(v).text()) }) var _len = $(".slide-nav-ul li").length; if (_len == 0) { $(".main-left").remove(); $(".main-right").css({ "width": "100%", "float": "none" }); } if ($(".right-nr table").length > 0) { $.each($(".right-nr table"), function (k, v) { $(v).removeAttr("style"); $(v).wrap("
"); }); } //手机没有二级的箭头隐藏 $(".menu-item").each(function (k, v) { if ($(this).find("li").length == 0) { $(v).removeClass("menu-item-has-children"); $(this).find(".submenu-toggle").remove(); } }); var w = $(window).width(); if (w > 991) { $(".side-nav-panel").show(); } $(window).resize(function () { w = $(window).width(); if (w > 991) { $(".side-nav-panel").show(); } }); $(".nav_name").click(function () { $(".side-nav-panel").slideToggle(150); }); $(document).ready(function () { //判断是否存在ul $(".ny-nav-ul li:has(ul)").hover(function () { //$(this) 代表.navmenu li $(this).children("a").addClass("move"); if ($(this).find("li").length > 0) { //显示下拉菜单 $(this).children("ul").stop(true, true).slideDown("slow") } }, function () { $(this).children("a").removeClass("move"); //隐藏下拉菜单 $(this).children("ul").stop(true, true).slideUp("slow") }); }); $(".b-link select").change(function () { var _val = $(this).val(); if (_val.length > 0) { window.open($(this).val()); } }); $(".ban-tit").click(function () { var $this = $(this); var $pp = $this.parents(".ban-box").find(".view-cnt"); var $i = $this.find("i"); //if ($pp.css("display") == "none") { // $i.text("-"); //} else { // $i.text("+"); //} $pp.slideToggle(); }); var src = $(".lm-img").data("src"); var oldsrc = $(".lm-img").data("oldsrc"); if (src != null) { if (src.length > 0) { $(".lm-img").attr("src", src); } else { $(".lm-img").attr("src", oldsrc); } }