锘?(function () { //-------- 瀵艰埅 -------- //-------- 鍒ゆ柇鍒嗚鲸鐜 -------- $(window).resize(function () { }) $(window).load(function () { positioncont(); $(window).resize(function () { positioncont(); }) }) function positioncont() { } var overflowwid = $("body").css("overflow", "hidden").width(); var windowwid = $("body").removeAttr("style").width(); var scrollwid = overflowwid - windowwid; if (windowwid + scrollwid > 991) { //pc瀵艰埅 $('.wwnav ul li').unbind("mouseenter").bind('mouseenter', function () { $(this).find('.wwnavlist').show(); }); $('.wwnav ul li').unbind("mouseleave").bind('mouseleave', function () { $(this).find('.wwnavlist').hide(); }); $('.wwnavdrop').unbind("mouseenter").bind('mouseenter', function () { if ($(this).find('ul li').length == 0) { $(this).find('.wwnavdroplist').hide() } else { $(this).find('.wwnavdroplist').show(); } }); $('.wwnavdrop').unbind("mouseleave").bind('mouseleave', function () { $(this).find('.wwnavdroplist').hide(); }); if ($('.wwnavdrop').find('.wwnavdroplist').lengths > 0) { $('.wwnavdrop').unbind("mouseenter").bind('mouseenter', function () { $(this).find('.wwnavdroplist').show(); }); } } else { $(".wwnav ul li").unbind("mouseenter"); $(".wwnavdrop").unbind("mouseenter"); $(".wwnav ul li").unbind("mouseleave"); $(".wwnavdrop").unbind("mouseleave"); } //$(".wwchoosetext").eq(0).css("display", "none"); $(".yjchan a[href='" + window.location.pathname + "']").addClass("cur"); var path = 'Government'; var url = window.location.pathname; //if (url.indexOf("Government") >= 0) { // $(".yjchan a[href='/Subpage/InduOverview']").addClass("cur"); //} var n = url.substr(0, url.lastIndexOf('/')); var s = n.substring(9); switch (s) { case 'Government': case 'InduOverview': case 'SmartFamliy': case 'SmartCloud': case 'Interrogation': case 'SafeInfo': case 'SmartTower': case 'WebOfThings': case 'SmartCity': $(".yjchan a[href='/Subpage/InduOverview/InduOverview']").addClass("cur"); break; //case 'Product': $(".yjchan a[href='/Subpage/Product/IntelligentMonitor']").addClass("cur"); // break; case 'TechnologyInnovation': $(".yjchan a[href='/Subpage/TechnologyInnovation/Monitor']").addClass("cur"); break; case 'AboutSaida': $(".yjchan a[href='/Subpage/AboutSaida/Business']").addClass("cur"); break; case 'NewsPape': case 'HNewsPaper': case 'News': $(".yjchan a[href='/Subpage/News/News']").addClass("cur"); break; case 'HumanResources': $(".yjchan a[href='/Subpage/HumanResources/Talents']").addClass("cur"); break; case 'Contact': $(".yjchan a[href='/Subpage/Contact/ContactUs']").addClass("cur"); break; } })