1jQuery(function() { 2 $(".img-bg").each(function(index, element) { 3 $(this).css("background-image", "url('" + $(this).find("img").attr("src") + "')") 4 }); 5 // nav-dropdown 6 dropdown(".navList > li"); 7 dropdown(".navRig > li"); 8 $(".navBtn").on('click',function(){ 9 if ($(window).width() <= 1200) { 10 $(this).toggleClass('active'); 11 $(".navBox").slideToggle(); 12 } 13 }) 14 15 header() 16 $(document).scroll(function(){ 17 header() 18 }) 19 20 21 $('.nav-btn').click(function () { 22 23 var title = $(".nav-input").val(); 24 if (title == "") { 25 layer.msg("ÇëÊäÈë¹Ø¼ü×Ö"); 26 27 $(".nav-input").focus(); 28 return; 29 } 30 window.location.href = "/search.aspx?title=" + title; 31 }); 32 33 $('.nav-input').keydown(function (e) { 34 if (e.keyCode == 13) { 35 var title = $(".nav-input").val(); 36 if (title == "") { 37 layer.msg("ÇëÊäÈë¹Ø¼ü×Ö"); 38 $(".nav-input").focus(); 39 return; 40 } 41 window.location.href = "/search.aspx?title=" + title; 42 } 43 }); 44 $("#top").on('click',function(){goTop()}) 45 $(".play").click(function(){ 46 var src = $(this).data('video'); 47 if(src){ 48 video(src); 49 $('.video-bg').fadeIn(); 50 $('#video')[0].play(); 51 } 52 }) 53 $(document).on('click','.video-box .close',function(){ 54 $('.video-bg').fadeOut(); 55 setTimeout(() => { 56 $('.video-bg').remove() 57 }, 500); 58 }) 59 60}) 61 62function goTop() { 63 $('html , body').animate({ 64 scrollTop: 0 65 }, 'slow') 66} 67 68function dropdown(event) { 69 addDropdown(event) 70 $(event + ".dropdown").hover(function(e) { 71 if ($(window).width() > 1200) { 72 $(this).addClass('cur') 73 $(this).children(".nav-dropdown,.foot-con").stop(false, false).slideDown(); 74 e.preventDefault() 75 } 76 }, function(e) { 77 if ($(window).width() > 1200) { 78 $(this).removeClass('cur') 79 $(this).children(".nav-dropdown,.foot-con").stop(false, false).slideUp(200); 80 e.preventDefault() 81 } 82 }); 83 $(event + ".dropdown > a").click(function(e) { 84 if ($(window).width() <= 1200) { 85 if ($(this).parent().hasClass('cur')) { 86 $(this).parent().removeClass('cur') 87 $(this).parent().children(".nav-dropdown,.foot-con").slideUp(150) 88 } else { 89 $(event + ".dropdown").removeClass('cur') 90 $(event).parent().find(".nav-dropdown,.foot-con").slideUp(150); 91 $(this).parent().addClass('cur') 92 $(this).parent().children(".nav-dropdown,.foot-con").slideDown(150) 93 } 94 e.preventDefault() 95 } 96 }) 97} 98 99function addDropdown(event) { 100 $(event).each(function() { 101 if ($(this).children("ul,div").length) { 102 $(this).addClass('dropdown'); 103 addDropdown($(this).children("ul,div").children("li")) 104 } 105 }) 106} 107 108function scollBar(obj){ 109 if($(obj).length>0){ 110 $(obj).mCustomScrollbar({ 111 mouseWheelPixels:500, 112 autoDraggerLength:false, 113 advanced: { 114 autoScrollOnFocus: "" 115 } 116 }); 117 } 118} 119 120function video(src){ 121 var video = `<div class="video-bg"> 122 <div class="video-box"> 123 <div class="close"><i class="iconfont icon-guanbi"></i></div> 124 <video id="video" src="${src}" poster="" controls loop webkit-playsinline="true" playsinline="true" x5-video-player-type="h5" x5-video-orientation="h5" x5-video-player-fullscreen="true"></video> 125 </div> 126 </div>` 127 $('body').append(video); 128} 129 130function header(){ 131 if($(this).scrollTop() > $(".header").height() && $(window).width() > 1200){ 132 $(".header").removeClass('no-bg') 133 }else{ 134 $(".header").addClass('no-bg') 135 } 136 if($(this).scrollTop() > $(".header").height()){ 137 $(".on-line li#top").slideDown(); 138 }else{
139 $(".on-line li#top").slideUp(); 140 } 141}
Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.