1// JavaScript Document 2 3jQuery(function($) { 4$(function() { 5 var gnav = $('.gnav'); 6 gnav.css('display','none'); 7 $('.gnav-btn').on('click', function() { 8 gnav.slideToggle(500); 9 if ($(this).hasClass('is-open')) { 10 $(this).removeClass('is-open'); 11 } else { 12 $(this).addClass('is-open'); 13 } 14 }); 15 }); 16 17$(function(){ 18 var $setElem = $('.switch'), 19 pcName = '_pc', 20 spName = '_sp', 21 replaceWidth = 480; 22 $setElem.each(function(){ 23 var $this = $(this); 24 function imgSize(){ 25 if(window.innerWidth > replaceWidth) { 26 $this.attr('src',$this.attr('src').replace(spName,pcName)).css({visibility:'visible'}); 27 } else { 28 $this.attr('src',$this.attr('src').replace(pcName,spName)).css({visibility:'visible'}); 29 } 30 } 31 $(window).resize(function(){imgSize();}); 32 imgSize(); 33 }); 34}); 35 36$(function(){ 37 $(window).on('scroll load', function () { 38 $('.scroll').each(function(){ 39 var elemPos = $(this).offset().top; 40 var scroll = $(window).scrollTop(); 41 var windowHeight = $(window).height(); 42 if (scroll > elemPos - windowHeight){ 43 $(this).addClass('scrollin'); 44 } else { 45 $(this).removeClass('scrollin'); 46 } 47 }); 48 }); 49}); 50 51var set_anim = $('.anime_sec'); 52 $(window).on('scroll resize', function () { 53 var set_height = 100; 54 set_anim.each(function () { 55 var set_this = $(this), 56 set_elm = $(this), 57 elm_top = set_this.offset().top, 58 elm_bottom = set_this.outerHeight(), 59 scr_top = $(window).scrollTop(), 60 win_height = $(window).height(), 61 head_height = $('.g_nav').height(); 62 if(scr_top > elm_top + elm_bottom){ 63 set_elm.removeClass('fadein'); 64 }else if (scr_top > elm_top - win_height + set_height) { 65 set_elm.addClass('fadein'); 66 }else{ 67 set_elm.removeClass('fadein'); 68 } 69 }); 70 }); 71 }); 72 73 74 75 76$(function(){ 77 78 $("#toggle").click(function(){ 79 80 $("#menu").slideToggle(); 81 82 return false; 83 84 }); 85 86 $(window).resize(function(){ 87 88 var win = $(window).width(); 89 90 var p = 480; 91 92 if(win > p){ 93 94 $("#menu").show(); 95 96 } else { 97 98 $("#menu").hide(); 99 100 } 101 102 }); 103 104}); 105 106 107 108$(function(){ 109 $('#loopslider').each(function(){ 110 var loopsliderWidth = $(this).width(); 111 var loopsliderHeight = $(this).height(); 112 $(this).children('ul').wrapAll('<div id="loopslider_wrap"></div>'); 113 114 var listWidth = $('#loopslider_wrap').children('ul').children('li').width(); 115 var listCount = $('#loopslider_wrap').children('ul').children('li').length; 116 117 var loopWidth = (listWidth)*(listCount); 118 119 $('#loopslider_wrap').css({ 120 top: '0', 121 left: '0', 122 width: ((loopWidth) * 2), 123 height: (loopsliderHeight), 124 overflow: 'hidden', 125 position: 'absolute' 126 }); 127 128 $('#loopslider_wrap ul').css({ 129 width: (loopWidth) 130 }); 131 loopsliderPosition(); 132 133 function loopsliderPosition(){ 134 $('#loopslider_wrap').css({left:'0'}); 135 $('#loopslider_wrap').stop().animate({left:'-' + (loopWidth) + 'px'},50000,'linear'); 136 setTimeout(function(){ 137 loopsliderPosition(); 138 },50000); 139 }; 140 141 $('#loopslider_wrap ul').clone().appendTo('#loopslider_wrap'); 142 }); 143}); 144 145
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.