// JavaScript Document $(function() { //return top $("#returnTop").click(function() { var speed = 400; //滑动的速度 $('body,html').animate({ scrollTop: 0 }, speed); return false; }); //做导航mouseover,mouseleave $(".sub_nav ul li").mouseover(function() { // $(this).children().css({ "color": "#0082cc" }) }) $(".sub_nav ul li").mouseleave(function() { /*$(this).css({"background":"#fff"});*/ // $(this).children().css({ "color": "#333" }); }) //侧导航显示,隐藏 // $(".sub_nava").toggle( // function() { // $(this).removeClass("sub_nava0").addClass("sub_nava1"); // $(this).css({ "color": "#0082cc" }); // $(this).children(".downmenu").show(); // }, // function() { // $(this).removeClass("sub_nava1").addClass("sub_nava0"); // $(this).css({ "color": "#333" }); // $(this).children(".downmenu").hide(); // } // ); // $(".yc").click(function(){ // $(".xsw").toggle(); // }); // $(".yc1").click(function(){ // $(".xs1").toggle(); // }); $(".example").luara({ width: "570", height: "424", interval: 4000, selected: "seleted" }); $(".nav ul li").mouseover(function() { $(this).children(".nav ul li .nav_sub").show(); $(this).children("a").css({ "border-radius": "10px", "background": "#d9eaff" }); }) $(".nav ul li").mouseleave(function() { $(this).children(".nav ul li .nav_sub").hide(); $(this).children("a").css({ "border-radius": "0px", "background": "none" }); }) $(".head_r #fdj").mouseover(function() { $(this).find(".fdj").show(); }) $(".head_r #fdj").mouseleave(function() { $(this).find(".fdj").hide(); }) $(".head_r #language").mouseover(function() { $(this).find(".language").show(); }) $(".head_r #language").mouseleave(function() { $(this).find(".language").hide(); }) $(".head_r #menu").mouseover(function() { $(this).find(".menu").show(); }) $(".head_r #menu").mouseleave(function() { $(this).find(".menu").hide(); }) // $("#menupic").click(function() { // //浏览器宽度 // var screen_w = $(window).width(); // $(".menu").css({ "left": screen_w - 240 + "px", "top": "100px" }) // }) // $(".off").click(function() { // $(".menu").css("left", "20000px") // }) // $(".menu .a0").click(function() { // var currentIndexName = $(this).attr("class") // currentIndexName = currentIndexName.substr(currentIndexName.length - 2) // //alert(currentIndexName) // if (currentIndexName == 'a1') { // $(this).removeClass("a1").addClass("a2") // //处理业务 // } else { // $(this).removeClass("a2").addClass("a1") // //处理业务 // } // $(this).children(".a1list").toggle(); // }) $(".news2_qie").click(function() { var num1 = $(".news2_qie").index(this); $(".news2_qie").removeClass("on").eq(num1).addClass("on"); $(".news2_p .news2_con").hide().eq(num1).show(); }) $(".works_nav ul li").mouseover(function() { $(this).children(".works_content").show(); $(this).children("p").css({ "color": "#0568bb" }); $(this).children(".works_icon").css({ "backgroundPositionY": "-50px" }); }) $(".works_nav ul li").mouseleave(function() { $(this).children(".works_content").hide(); $(this).children("p").css({ "color": "#333" }); $(this).children(".works_icon").css({ "backgroundPositionY": "0px" }); }) $(".colse_but").click(function() { $(".maint").slideUp(600); }) var JiTuanYanWenIndex = 1; $(".news3t input").click(function() { $(".news3t span").not(this).css({ "color": "#333" }) $(this).parent("span").css({ "color": "#0086cc" }) $(".news3t span input").not(this).attr("isChecked", "false") $(this).attr("isChecked", "true") var className = "." + $(this).attr("newsClassBind") + "001" $(".news3_con").children("ul").not(className).hide() $(className).show() JiTuanYanWenIndex = 1 }) var dangjiandongtaiIndex = 1; $(".news3t input").click(function() { $(".news3t span").not(this).css({ "color": "#333" }) $(this).parent("span").css({ "color": "#0086cc" }) $(".news3t span input").not(this).attr("isChecked", "false") $(this).attr("isChecked", "true") var className = "." + $(this).attr("newsClassBind") + "001" $(".news3_con").children("ul").not(className).hide() $(className).show() dangjiandongtaiIndex = 1 }) $(".GoLeft").click(function() { var classBaseName = $("input[isChecked='true']").attr("newsClassBind") if (JiTuanYanWenIndex > 1) { JiTuanYanWenIndex-- var className = "." + classBaseName + "00" + JiTuanYanWenIndex $(".news3_con").children("ul").not(className).hide() $(className).show() } }) $(".GoRight").click(function() { var classBaseName = $("input[isChecked='true']").attr("newsClassBind") var len = $("ul[class*=" + classBaseName + "]").size() if (JiTuanYanWenIndex < len) { JiTuanYanWenIndex++ var className = "." + classBaseName + "00" + JiTuanYanWenIndex $(".news3_con").children("ul").not(className).hide() $(className).show() } }) /*字体大小变化*/ $("#big").click(function() { $(".newsart").css({ "font-size": "16px" }); }) $("#middle").click(function() { $(".newsart").css({ "font-size": "14px" }); }) $("#small").click(function() { $(".newsart").css({ "font-size": "12px" }); }) }) // window.onload = function() { // var oBtnLeft = document.getElementById("goleft"); // var oBtnRight = document.getElementById("goright"); // var oDiv = document.getElementById("indexmaindiv"); // var oDiv1 = document.getElementById("maindiv1"); // // var oUl = oDiv.getElementsByTagName("ul")[0]; // // var aLi = oUl.getElementsByTagName("li"); // var now = -2 * (aLi[0].offsetWidth + 35); // oUl.style.width = aLi.length * (aLi[0].offsetWidth + 35) + 'px'; // oBtnRight.onclick = function() { // var n = Math.floor((aLi.length * (aLi[0].offsetWidth + 35) + oUl.offsetLeft) / aLi[0].offsetWidth); // if (n <= 5) { // move(oUl, 'left', 0); // } else { // move(oUl, 'left', oUl.offsetLeft + now); // } // } // oBtnLeft.onclick = function() { // var now1 = -Math.floor((aLi.length / 2)) * 2 * (aLi[0].offsetWidth + 35); // if (oUl.offsetLeft >= 0) { // move(oUl, 'left', now1); // } else { // move(oUl, 'left', oUl.offsetLeft - now); // } // } // var timer = setInterval(oBtnRight.onclick, 3000); // oDiv.onmouseover = function() { // clearInterval(timer); // } // oDiv.onmouseout = function() { // timer = setInterval(oBtnRight.onclick, 3000); // } // }; function getStyle(obj, name) { if (obj.currentStyle) { return obj.currentStyle[name]; } else { return getComputedStyle(obj, false)[name]; } } function move(obj, attr, iTarget) { clearInterval(obj.timer) obj.timer = setInterval(function() { var cur = 0; if (attr == 'opacity') { cur = Math.round(parseFloat(getStyle(obj, attr)) * 100); } else { cur = parseInt(getStyle(obj, attr)); } var speed = (iTarget - cur) / 6; speed = speed > 0 ? Math.ceil(speed) : Math.floor(speed); if (iTarget == cur) { clearInterval(obj.timer); } else if (attr == 'opacity') { obj.style.filter = 'alpha(opacity:' + (cur + speed) + ')'; obj.style.opacity = (cur + speed) / 100; } else { obj.style[attr] = cur + speed + 'px'; } }, 30); } /*分享网页代码*/ window._bd_share_config = { "common": { "bdSnsKey": {}, "bdText": "", "bdMini": "2", "bdMiniList": false, "bdPic": "", "bdStyle": "2", "bdSize": "24" }, "share": {} }; with(document) 0[(getElementsByTagName('head')[0] || body).appendChild(createElement('script')).src = 'http://bdimg.share.baidu.com/static/api/js/share.js?v=89860593.js?cdnversion=' + ~(-new Date() / 36e5)]; //tab切换 $(function() { $('.tabbox-tit').on('click', 'li', function() { $(this).addClass('active').siblings().removeClass('active'); $('.tabbox-list').find('.cont').eq($(this).index()).show().siblings().hide(); }) }) //点击下拉 $(function() { $('.droplist').on('click', '.droptit', function() { if ($(this).siblings('.dropcont').hasClass('open')) { $(this).siblings('.dropcont').removeClass('open'); $(this).find('.icon-drop').addClass('icon-close'); } else { $(this).siblings('.dropcont').addClass('open'); $(this).find('.icon-drop').removeClass('icon-close'); } }) })