1var PC_FIXED = false; 2var SP_FIXED = false; 3var SP_WIDTH = 769; 4var SPEED = 500; 5 6var TEL = '0000000000'; 7 8var UA = navigator.userAgent.toLowerCase(); 9// iPhone 10var isiPhone = (UA.indexOf('iphone') > -1); 11// Android 12var isAndroid = (UA.indexOf('android') > -1) && (UA.indexOf('mobile') > -1); 13 14function scrollPosition(position) { 15 position -= PC_FIXED && $(window).innerWidth() >= SP_WIDTH || SP_FIXED && $(window).innerWidth() < SP_WIDTH ? $('header').innerHeight() : 0; 16 $('html, body').animate({ 17 scrollTop: position 18 }, SPEED); 19} 20 21//ï¼<a href="#top">ã®æ§ã«è¨è¿°ããã¨æ»ããã«ã¹ã¯ãã¼ã«ãããï¼ 22$(function () { 23 $('a[href^="#"]').click(function () { 24 var position = $(this.hash).length > 0 ? $(this.hash).offset().top : 0; 25 scrollPosition(position); 26 return false; 27 }); 28}); 29 30// ä¸å®éã¹ã¯ãã¼ã«ããã¨ãã¼ã¸ãããã«æ»ãã表示ãããï¼å ´æçã®æå®ã¯common.scssã«ã¦ï¼ 31$(function () { 32 var top_btn = $('.pagetop'); 33 top_btn.hide(); 34 $(window).scroll(function () { 35 $(this).scrollTop() > 100 ? top_btn.fadeIn() : top_btn.fadeOut(); 36 }); 37 38 top_btn.click(function () { 39 scrollPosition(0); 40 return false; 41 }); 42}); 43 44// rolloverï¼_offã¨æ«å°¾ã«ã¤ããç»åããªã³ãã¦ã¹ã§_onã¨ã¤ããç»åã«åãæ¿ããï¼ 45$(function () { 46 $('img').hover( 47 function () { 48 $(this).attr('src', $(this).attr('src').replace('_off.', '_on.')); 49 }, 50 function () { 51 $(this).attr('src', $(this).attr('src').replace('_on.', '_off.')); 52 } 53 ); 54}); 55 56//ã¹ãã¼ããã©ã³æã®ã¿é»è©±çºä¿¡ã§ããæ§ã«ããï¼imgã¿ã°ç¨ãimgã¿ã°ã«ä»»æã®classãæå®ãããï¼ 57$(function () { 58 var device = navigator.userAgent; 59 if (isiPhone || isAndroid) { 60 $(".tel").wrap('<a href="tel:'+TEL+'"></a>'); 61 } 62}); 63 64$(function () { 65 var menu_btn = $('.slidemenu-btn'); 66 var body = $(document.body); 67 var top = 0; 68 var menu_open = false; 69 70 menu_btn.on('click', function () { 71 console.log($(window).scrollTop()); 72 if (!menu_open) { 73 top = $(window).scrollTop(); 74 } 75 console.log(top); 76 body.toggleClass('open'); 77 menu_btn.toggleClass('active'); 78 menu_open = true; 79 if (body.hasClass('open')) { 80 body.css({ 81 'height': window.innerHeight, 82 'top': -top 83 }); 84 } else { 85 body.removeAttr('style'); 86 $(window).scrollTop(top); 87 menu_open = false; 88 } 89 }); 90}); 91 92//ãããã¼ãåºå®ã®æã¹ããã®æã®ãã¼ã¸å ãªã³ã¯ç¨ 93$(function () { 94 $(document).on('ready', function() { 95 if (location.hash != "") { 96 var pos = $(location.hash).offset().top; 97 if (PC_FIXED && $(window).innerWidth() >= SP_WIDTH || SP_FIXED && $(window).innerWidth() < SP_WIDTH) { 98 pos -= $('header').innerHeight(); 99 } 100 $("html, body").animate({ scrollTop: pos }, 1, "swing"); 101 } 102 }); 103}); 104//ã¯ãªãã¯ã§ç»å夿´ 105$(function () { 106 $('.slidemenu-btn').click(function () { 107 var img = $(this).children('img'); 108 if ($(this).hasClass('active')) { 109 $(img).attr('src', $(img).attr('src').replace('menu', 'close')); 110 } 111 else { 112 $(img).attr('src', $(img).attr('src').replace('close', 'menu')); 113 } 114 }); 115});
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.