1jQuery(function($){ 2 3$(window).load(function(){ 4 setDevice(); 5 //SP menu 6 $("#menu").on("tap click",function(){ 7 if($("header .nav").hasClass("active")){ 8 $("header .nav").fadeOut(); 9 }else{ 10 $("header .nav").fadeIn(); 11 } 12 $(this).toggleClass("active"); 13 $("#lang").toggleClass("active"); 14 $("header .nav").toggleClass("active"); 15 }); 16 $(".nav>ul>li>a").on("tap click",function(e){ 17 if( getDevice == 'sp' || getDevice == 'tab' ){ 18 var url= $(this).attr("href"); 19 if($(this).next("div").hasClass("toggle")){ 20 e.preventDefault(); 21 if($(this).hasClass("active")){ 22 $(this).next(".toggle").fadeOut(); 23 }else{ 24 $(this).next(".toggle").fadeIn(); 25 } 26 $(this).toggleClass("active"); 27 } 28 } 29 }); 30 $(".toggle a").on("tap click",function(e){ 31 if( getDevice == 'sp' || getDevice == 'tab' ){ 32 var url= $(this).attr("href"); 33 //console.log(url); 34 if($(this).next("ul").hasClass("s")){ 35 e.preventDefault(); 36 if($(this).hasClass("active")){ 37 $(this).parent(".col").find(".s").fadeOut(); 38 }else{ 39 $(this).parent(".col").find(".s").fadeIn(); 40 } 41 $(this).toggleClass("active"); 42 } 43 } 44 }); 45 //FAQ Toggle 46 $("#faq h3").on("tap click",function(){ 47 if($(this).hasClass("active")){ 48 $(this).next(".toggle").fadeOut(); 49 }else{ 50 $(this).next(".toggle").fadeIn(); 51 } 52 $(this).toggleClass("active"); 53 }); 54 55 //PageTop Scroll 56 $(".pagetop").on("tap click",function(e){ 57 e.preventDefault(); 58 var location = $("html").offset().top; 59 $('html,body').animate({ 60 scrollTop: location 61 }, 'slow','swing'); 62 return false; 63 }); 64 65 //RACE Scroll 66 $(".anchor a").on("tap click",function(e){ 67 e.preventDefault(); 68 var href = $(this).attr("href"); 69 var target = $(href == "#" || href == "" ? 'html' : href); 70 var location = target.offset().top-50; 71 $('html,body').animate({ 72 scrollTop: location 73 }, 'slow','swing'); 74 return false; 75 }); 76 77 //Gallery 78 if($(".popup").length){ 79 $(".popup").magnificPopup({ 80 type: 'image', 81 mainClass: 'mfp-fade', 82 removalDelay: 200, 83 preloader: false 84 }); 85 } 86 87 // 88 $(".box .more").on("tap click",function(e){ 89 e.preventDefault(); 90 if($(this).hasClass("active")){ 91 $(this).text("ãã£ã¨è¦ã").parent("p").prev(".toggle").fadeOut(); 92 }else{ 93 $(this).text("éãã").parent("p").prev(".toggle").fadeIn(); 94 } 95 $(this).toggleClass('active') 96 }); 97}); 98 99$(window).resize(function(){ 100 setDevice(); 101 if($(window).width() > 768){ 102 $(".nav").removeAttr("style"); 103 $(".nav .toggle").removeAttr("style"); 104 } 105}); 106 107$(window).scroll(function(){ 108 //PageTop Fade 109 var offset = $(window).scrollTop(); 110 if(offset > 150){ 111 $(".pagetop").addClass("active"); 112 }else{ 113 $(".pagetop").removeClass("active"); 114 } 115}); 116 117var getDevice; 118function setDevice(){ 119 getDevice = (function(){ 120 var ua = navigator.userAgent; 121 if(ua.indexOf('iPhone') > 0 || ua.indexOf('iPod') > 0 || ua.indexOf('Android') > 0 && ua.indexOf('Mobile') > 0){ 122 return 'sp'; 123 }else if(ua.indexOf('iPad') > 0 || ua.indexOf('Android') > 0){ 124 return 'tab'; 125 }else{ 126 return 'other'; 127 } 128 })(); 129} 130 131});
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.