1/** 2 * common.js 3 * 4 * version --- 1.0 5 * updated --- 2017/11/30 6 */ 7 8 9/* !isUA -------------------------------------------------------------------- */ 10var isUA = (function(){ 11 var ua = navigator.userAgent.toLowerCase(); 12 indexOfKey = function(key){ return (ua.indexOf(key) != -1)? true: false;} 13 var o = {}; 14 o.ie = function(){ return indexOfKey("msie"); } 15 o.fx = function(){ return indexOfKey("firefox"); } 16 o.chrome = function(){ return indexOfKey("chrome"); } 17 o.opera = function(){ return indexOfKey("opera"); } 18 o.android = function(){ return indexOfKey("android"); } 19 o.ipad = function(){ return indexOfKey("ipad"); } 20 o.ipod = function(){ return indexOfKey("ipod"); } 21 o.iphone = function(){ return indexOfKey("iphone"); } 22 return o; 23})(); 24 25 26/* !pageScroll -------------------------------------------------------------- */ 27 28jQuery.easing.easeInOutCubic = function (x, t, b, c, d) { 29 if ((t/=d/2) < 1) return c/2*t*t*t + b; 30 return c/2*((t-=2)*t*t + 2) + b; 31}; 32 33$(window).on('load resize',function(){ 34 //var scrolltop = $('#headerIn').height(); //header fixed 35 $('a.scroll, .scroll a').each(function(){ 36 $(this).unbind('click').bind("click keypress",function(e){ 37 e.preventDefault(); 38 var target = $(this).attr('href'); 39 //var targetY = $(target).offset().top-scrolltop; //header fixed 40 var targetY = $(target).offset().top; 41 var parent = ( isUA.opera() )? (document.compatMode == 'BackCompat') ? 'body': 'html' : 'html,body'; 42 $(parent).animate( 43 {scrollTop: targetY }, 44 400 45 ); 46 return false; 47 }); 48 }); 49}); 50 51/* !common --------------------------------------------------- */ 52$(function(){ 53 $('.pageTop a').click(function(){ 54 $('html,body').animate({scrollTop: 0}, 'slow','swing'); 55 return false; 56 }); 57 //ã¹ããã°ãã¼ãã«ãã 58 $(".btnMenu").click(function(){ 59 $("header nav").animate({ height: 'toggle', opacity: 'toggle' }, 'first'); 60 $(this).toggleClass("active"); 61 }); 62 $(window).resize(function(){ 63 setTimeout(function(){ 64 if($(window).width() > 767) { 65 $("header nav").attr("style",""); 66 } 67 },500); 68 }); 69 $('.biggerlink').biggerlink(); 70 71 $(".tabWrap").each(function(){ 72 var $this = $(this), 73 $btn = $this.children('.tabCtrl').find('li'), 74 $box = $this.children('.tabBox'); 75 $btn.click(function(){ 76 $btn.removeClass("onActive"); 77 $(this).addClass("onActive"); 78 var index = $btn.index(this); 79 $box.addClass('hide'); 80 $box.eq(index).removeClass('hide'); 81 }); 82 }); 83 84 $(window).on('load resize',function(){ 85 $('.toggleWrap').each(function(){ 86 var $btn = $(this).find('.toggleBtn'); 87 var $box = $(this).find('.toggleBox'); 88 if($(window).width() > 767){ 89 $btn.unbind('click'); 90 $box.attr("style",""); 91 }else{ 92 $btn.unbind('click').click(function(){ 93 if($(this).hasClass('open')){ 94 $(this).removeClass('open') 95 $box.stop().slideUp(200); 96 }else{ 97 $(this).addClass('open') 98 $box.stop().slideDown(200); 99 } 100 }); 101 } 102 }); 103 }); 104 105 $('.dataImage').each(function(){ 106 var url = $(this).data('image'); 107 $(this).css({backgroundImage: 'url('+url+')'}); 108 }); 109 110 $('.imgBox').each(function(){ 111 $(this).css({backgroundImage: 'url('+$(this).data('img')+')'}); 112 }); 113 $(window).scroll(function(){ 114 if($(window).scrollTop() > 150){ 115 $('.pageTop, .pageCart').fadeIn(); 116 }else{ 117 $('.pageTop, .pageCart').fadeOut(); 118 } 119 }); 120});
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.