// JavaScript Document // JavaScript Document /* document.oncontextmenu=new Function("event.returnValue=false;"); document.onselectstart=new Function("event.returnValue=false;"); document.body.onselectstart = document.body.ondrag = function(){ return false; } */ /*document.onkeydown = function(){ if(window.event && window.event.keyCode == 123) { event.keyCode=0; event.returnValue=false; } if(window.event && window.event.keyCode == 13) { window.event.keyCode = 505; } if(window.event && window.event.keyCode == 8) { window.event.returnValue=false; } } var img=$("img"); img.on("contextmenu",function(){return false;}); img.on("dragstart",function(){return false;});//禁止图片拖拽 document.oncontextmenu = function (event){ if(window.event){ event = window.event; }try{ var the = event.srcElement; if (!((the.tagName == "INPUT" && the.type.toLowerCase() == "text") || the.tagName == "TEXTAREA")){ return false; } return true; }catch (e){ return false; } } //屏蔽键盘事件 document.onkeydown = function (){ var e = window.event || arguments[0]; //F12 if(e.keyCode == 123){ return false; //Ctrl+Shift+I }else if((e.ctrlKey) && (e.shiftKey) && (e.keyCode == 73)){ return false; //Shift+F10 }else if((e.shiftKey) && (e.keyCode == 121)){ return false; //Ctrl+U }else if((e.ctrlKey) && (e.keyCode == 85)){ setTimeout(function(){ },1); return false; } }; //屏蔽鼠标右键 document.oncontextmenu = function (){ setTimeout(function(){ },1); return false; }*/ function isIE() { if (!!window.ActiveXObject || "ActiveXObject" in window) { return true; } else { return false; } } $(".container01 .miso_hd").miso({ fade: true, arrows: false, waitForAnimate: false, asNavFor: '.container01 .miso_bd' }); $(".container01 .miso_bd").miso({ waitForAnimate: false, dots: true, arrows: false, asNavFor: '.container01 .miso_hd' }); $('.list_box9').miso({ arrows: false, slidesToShow: 4, responsive: [{ breakpoint: 992, settings: { slidesToShow: 2 } }, { breakpoint: 768, settings: { slidesToShow: 2 } }] }); $(".container04 .miso-arrow1_box .miso-prev1").on('click', function () { $('.list_box9').miso("prev"); }); $(".container04 .miso-arrow1_box .miso-next1").on('click', function () { $('.list_box9').miso("next"); }); $(".container05 .miso_hd").miso({ fade: true, arrows: false, dots: true, waitForAnimate: false, asNavFor: '.container05 .miso_bd' }); $(".container05 .miso_bd").miso({ waitForAnimate: false, arrows: false, asNavFor: '.container05 .miso_hd' }); $(".container09 .left .miso_hd").miso({ fade: true, adaptiveHeight: true, waitForAnimate: false, asNavFor: '.container09 .left .miso_bd' }); $(".container09 .left .miso_bd").miso({ waitForAnimate: false, arrows: false, asNavFor: '.container09 .left .miso_hd' }); $(".container09 .right .miso_hd").miso({ fade: true, adaptiveHeight: true, waitForAnimate: false, asNavFor: '.container09 .right .miso_bd' }); $(".container09 .right .miso_bd").miso({ waitForAnimate: false, arrows: false, asNavFor: '.container09 .right .miso_hd' }); $('.list_box15').miso({ arrows: false, slidesToShow: 2, responsive: [{ breakpoint: 768, settings: { slidesToShow: 2 } }] }); $(".list_box18").miso({ fade: true }); $(".list_box22").miso({ fade: true, dots: true }); $(function () { $("#miso_loading").fadeOut(); $('.search_btn').on('click', function () { $('.search-dialog-box').toggleClass("on"); }); $('.search-dialog-box .pub-close').on('click', function () { $('.search-dialog-box').removeClass("on"); }); $(".banner").addClass("on"); $(".list_box8 li ").hover(function () { $(this).stop().addClass("on"); $(this).siblings().stop().removeClass("on"); }); $(".list_box12 li:nth-child(1) .ico").html('资源 175'); $(".list_box12 li:nth-child(2) .ico").html('资源 199'); $(".list_box12s li .ico").html('资源 175'); $(".list_box19 li:nth-child(1) .ico").html('资源 198'); $(".list_box19 li:nth-child(2) .ico").html('资源 197'); $(".list_box19 li:nth-child(3) .ico").html('资源 196'); $(".list_box19 li:nth-child(4) .ico").html('资源 195'); $(".list_box19 li:nth-child(4) .ico").html('资源 176'); $(".list_box19 li:nth-child(5) .ico").html('资源 195'); $(".list_box19 li:nth-child(6) .ico").html('资源 194'); $(".list_box19 li:nth-child(7) .ico").html('资源 193'); $(".list_box21 li .ico").html('资源 177'); $(".list_box21s1 li .ico").html('资源 192'); $(".list_box23 li:nth-child(1) .ico").html('资源 191'); $(".list_box23 li:nth-child(2) .ico").html('资源 190'); $(".list_box23 li:nth-child(3) .ico").html('资源 189'); $(".list_box23 li:nth-child(4) .ico").html('资源 178'); $(".list_box23 li:nth-child(5) .ico").html('资源 188'); $(".list_box23 li:nth-child(6) .ico").html('资源 187'); $(".list_box23 li:nth-child(7) .ico").html('资源 186'); $(".list_box23 li:nth-child(8) .ico").html('资源 185'); $(".list_box23 li:nth-child(9) .ico").html('资源 184'); $(".list_box24 li:nth-child(1) .ico").html('资源 183'); $(".list_box24 li:nth-child(2) .ico").html('资源 180'); $(".list_box24 li:nth-child(3) .ico").html('资源 182'); $(".list_box24 li:nth-child(4) .ico").html('资源 179'); $(".list_box24 li:nth-child(5) .ico").html('资源 181'); $(".sicoh .ico").each(function (i) { $(this).find('svg').attr('id', 'svg-' + (i + 1)) }) var g = []; if (!isIE()) { $(".sicoh .ico svg").each(function (a, b) { a = $(this).attr("id"); g[a] = new Vivus(a, { type: "delayed", duration: 80, inViewport: true, autostart: true, }) }); $(".sicoh").mouseenter(function () { g[$(this).find("svg").attr("id")].reset().play() }); } $(".ar_article table").wrap('
');//表格外添加div $('.tc_btn[name]').click(function () { var tf_name_id = $(this).attr('name'); $('.tc[name=' + tf_name_id + ']').addClass('act'); }); $('.tc_close').click(function () { $(this).parents('.tc').removeClass('act'); }); $('.tc_bg').click(function () { $(this).parents('.tc').removeClass('act'); }); //移动端导航 /* ************************************************************************ */ $('#m_nav .list_box_nav_mobile li .list').each(function(){ $(this).parent().find('.con').append('') }) /* ************************************************************************ */ $(".list_box_nav_mobile>li i").click(function () { $(this).parents(".list_box_nav_mobile>li").find(".list").slideToggle(); $(this).parents(".list_box_nav_mobile>li").toggleClass("on1"); $(this).parents(".list_box_nav_mobile>li").siblings().find(".list").slideUp(); $(this).parents(".list_box_nav_mobile>li").siblings().removeClass("on1"); }); /*$("#m_nav .sub").hide(); $("#m_nav .void").click(functon(){ $(this).children(".sub").slideToggle(); //展开 });*/ $("#nav_btn_box").click(function () { $("#nav_btn_box .point").toggleClass("on"); $("#nav_btn_box").toggleClass("on"); $("#m_nav").toggleClass("act"); $(".nav_mask").fadeToggle(); }); $(".nav_mask").click(function () { $("#nav_btn_box .point").removeClass("on"); $("#nav_btn_box").removeClass("on"); $(this).fadeToggle(); $(".nav_btn_box").removeClass("act"); $("#m_nav").removeClass("act"); }) $("#m_nav .close").click(function () { $("#nav_btn_box .point").removeClass("on"); $("#nav_btn_box").removeClass("on"); $(".nav_btn_box").removeClass("act"); $("#m_nav").removeClass("act"); $(".nav_mask").fadeOut(); }); //移动端内页导航 $("#bnt_sub_nav").click(function () { $(this).toggleClass("on"); $("#sub_nav_content").slideToggle(); }); $("#sub_nav_content dt.title a").attr("href", "javascript:void(0)"); $("#sub_nav_content dt.title_on").next("dd").show(); $("#sub_nav_content dt.title").click(function () { if ($(this).hasClass("title_on")) { $(this).next("dd").slideToggle(); $(this).removeClass("title_on"); } else { $("#sub_nav_content dd").slideUp(); $("#sub_nav_content dt.title").removeClass("title_on").removeClass("on"); $(this).toggleClass("title_on"); $(this).next("dd").slideDown(); } }); //IE9 兼容placdholder属性 function placeholderSupport() { return 'placeholder' in document.createElement('input'); } if (!placeholderSupport()) { // 判断浏览器是否支持 placeholder $("[placeholder]").each(function () { var _this = $(this); // console.log($(this).height()); var inputHeight = parseInt(parseInt($(this).height() - 2) - 14) / 2; var inputHeight = parseInt(parseInt(parseInt($(this).height() - 2) / 2) - 7) + 'px'; _this.parent().css({ "position": "relative" }); var left = _this.position().left + parseInt(_this.css("padding-left")) + parseInt(_this.css("margin-left")) + "px"; var top = parseInt(_this.css("padding-top"));//+parseInt(_this.css("margin-top"))+"px"; var top = parseInt(_this.css("padding-top"));//+parseInt(_this.css("margin-top"))+"px"; _this.after('' + _this.attr("placeholder") + ''); //_this.after('' + _this.attr("placeholder") + ''); if (_this.val() != "") { _this.parent().find("span.placeholder").hide(); } else { _this.parent().find("span.placeholder").show(); } }).on("focus", function () { $(this).parent().find("span.placeholder").hide(); }).on("blur", function () { var _this = $(this); if (_this.val() != "") { _this.parent().find("span.placeholder").hide(); } else { _this.parent().find("span.placeholder").show(); } }); // 点击表示placeholder的标签相当于触发input $("span.placeholder").on("click", function () { $(this).hide(); $(this).siblings("[placeholder]").trigger("click"); $(this).siblings("[placeholder]").trigger("focus"); }); } /* $(".n_erji li").hover(function() { $(this).stop().addClass("on"); $(this).siblings().stop().removeClass("on"); }, function() { $(this).stop().removeClass("on"); $(".n_erji li.on1").stop().addClass("on"); }); $('.banner_slider').on('afterChange',function(event, slick, currentSlide, nextSlide){ console.log(currentSlide); if (currentSlide == 0){ myVideo.play(); $('.banner_slider').slick('slickPause'); } if (currentSlide != 0){ $('.banner_slider').slick('slickPlay'); } }) document.getElementById('myVideo').addEventListener('ended',myHandler,false); function myHandler(e) { $('.banner_slider').slick('slickPlay'); $('.banner_slider').slick('slickGoTo', "1"); } $('.banner_slider').slick({ fade: true, autoplay: false, cssEase: 'linear', cssEase: 'cubic-bezier(0.7, 0, 0.3, 1)', revArrow:'
', nextArrow:'
' }); $('.container00 .miso_hd').miso({ autoplaySpeed: 6000, autoplay: false, speed: 300, slidesToShow: 3, slidesToScroll: 1, arrows: false, dots:false, touchThreshold: 10, pauseOnHover: false, focusOnSelect: true, asNavFor: '.container00 .miso_bd' }); $('.container00 .miso_bd').miso({ autoplaySpeed: 6000, autoplay: false, speed: 300, slidesToShow: 1, slidesToScroll: 1, arrows: false, dots:false, touchThreshold: 10, pauseOnHover: false, focusOnSelect: true, asNavFor: '.container00 .miso_hd' }); $('.container00 .miso_hd').miso({ autoplay: false, slidesToShow: 3, speed:300, waitForAnimate: false, asNavFor: '.container00 .miso_bd', responsive: [{ breakpoint: 1200, settings: { slidesToShow: 3, slidesToScroll: 1 } }, { breakpoint: 768, settings: { slidesToShow: 2, slidesToScroll: 1 } }] }); $('.container00 .miso_bd').miso({ autoplay: false, fade:true, speed:300, waitForAnimate: false, asNavFor: '.container00 .miso_hd' }); $('.container00 .arrow1_box .miso-prev1').click(function () { $('.container00 .miso_hd').miso("prev") }); $('.container00 .arrow1_box .miso-next1').click(function () { $('.container00 .miso_hd').miso("next") }); $(".miso_hd li").click(function () { $(this).addClass("on"); $(this).siblings().removeClass("on"); $(".miso_bd li").hide().eq($(".miso_hd li").index(this)).show(); }) // $('.container00 .miso_bd').miso({ autoplay: false, fade: true, swipe: false, onAfterChange: function(e){ e.preventDefault(); $(".container00 .tabs .active").removeClass('active'); $(".container00 .tabs li").eq(currentSlide).addClass('active'); } }); $(".container00 .tabs li").on('click',function(e){ $(this).addClass('active'); $(this).siblings().removeClass('active'); $('.container00 .miso_bd').miso('misoGoTo',$(this).index()); }); $(".list_box_00").miso({ autoplay: false, rows:2, slidesPerRow:6, responsive: [{ breakpoint: 1200, settings: { slidesPerRow:4, } }, { breakpoint: 768, settings: { slidesPerRow:3 } }] }) var smVideo = { load: function (objs) { var objplay = jwplayer(objs.vcontainer).setup({ html5player: '/static/style/pc/js/video/html5player.js', file: objs.vfiles, image: objs.vfimg, width: '100%', height: '100%', aspectratio: '16:9', stretching: 'fill', controls: 'true', autostart: objs.isautoplay }); return objplay; } } $('').click(function () { smVideo.load({ vcontainer: 'videobox', //视频容器 vfiles: jQuery(this).attr("data-video"), //视频地址 vfimg: jQuery(this).attr("data-img"), //视频缩略图(封面) isautoplay: 'true' }); $(".vwrap").fadeIn(); }); $(".vwrap .close").click(function () { $(".vwrap").hide(); $('#videobox').html(""); });*/ });