1/** 2 * NOTE redmine#12609 3 * ããã¼ãã£ã³ã°ã¢ã¯ã·ã§ã³ãã¿ã³(fab)ãSPçãããªããªã 4 * ãã³ãã¼ã¬ã¼ã¡ãã¥ã¼ã«çµ±ä¸ããã¦ããã 5 * DIYããã®å¼ã³åºãããããããªãã¼ã ã«ã¯æ³¨æ 6 */ 7// ã¡ãã¥ã¼ãã¼ç¨ 8var mql = window.matchMedia('screen and (max-width: 768px)'); 9 10// Scroll Header 11var spHeader = $('.ly_headerSP'); 12var headerHeight = spHeader.outerHeight(true); 13var content = $('.ly_body'); 14 15$(function () { 16 // ããã 17 $(window).on('load scroll', function () { 18 scrollPos = $(this).scrollTop(); 19 if (scrollPos >= 95) { 20 spHeader.addClass('is_scroll'); 21 content.addClass('is_scroll'); 22 } else { 23 spHeader.removeClass('is_scroll'); 24 content.removeClass('is_scroll'); 25 } 26 27 // ã¹ã¯ãã¼ã«è¿½å¾ã¡ãã¥ã¼ 28 if (mql.matches) { 29 // ã¹ããã®å ´åã®ã¿ 30 var headNav = $('.ly_headerSP'); 31 // ç¾å¨ã®ä½ç½®ã95px以ä¸ãã¤ãã¯ã©ã¹fixedãä»ä¸ããã¦ããªãæ 32 // ãããï¼lgï¼55px, ãããï¼smï¼40px, åºå70px, ãã³ãã34px 33 if ($(this).scrollTop() >= 95 && headNav.hasClass('fixed') == false) { 34 // ä¸é¨ä½ç½èª¿æ´ 35 var headerHeight = mql.matches ? $('.ly_headerSP').height() : $('.ly_headerPC').height(); 36 $('body').css({ 'padding-top': headerHeight }); 37 // headerã®é«ãåä¸ã«è¨å® 38 headNav.css({ top: '-' + headerHeight + 'px' }); 39 // ã¯ã©ã¹fixedãä»ä¸ 40 headNav.addClass('fixed'); 41 // ä½ç½®ã0ã«è¨å®ããã¢ãã¡ã¼ã·ã§ã³ã®ã¹ãã¼ããæå® 42 headNav.animate({ top: 0 }, 300); 43 } 44 // ç¾å¨ã®ä½ç½®ã95px以ä¸ãã¤ãã¯ã©ã¹fixedãä»ä¸ããã¦ããæã«fixedãå¤ã 45 else if ($(this).scrollTop() < 95 && headNav.hasClass('fixed') == true) { 46 headNav.removeClass('fixed'); 47 // ä¸é¨ä½ç½èª¿æ´ 48 $('body').css({ 'padding-top': 0 }); 49 } 50 } 51 }); 52 53 $('nav').on('click', function (event) { 54 event.stopPropagation(); 55 }); 56 57 // PCããã¯ã¼ã¡ãã¥ã¼ 58 $('.un_menuTogglePC').on('click', function (event) { 59 event.stopPropagation(); 60 if ($(this).hasClass('active')) { 61 // ã¡ãã¥ã¼OFF 62 $(this).removeClass('active'); 63 $('nav').removeClass('active'); 64 // ã¹ã¯ãã¼ã«ããã¯è§£é¤ 65 $('body').css({ height: 'auto', overflow: 'scroll' }); 66 } else { 67 // ã¡ãã¥ã¼ON 68 $(this).addClass('active'); 69 $('nav').addClass('active'); 70 // ã¹ã¯ãã¼ã«ãã㯠71 $('body').css({ height: '100vh', overflow: 'hidden' }); 72 // ããå é¨ãä¸çªä¸ã«ç§»å 73 $('nav').scrollTop(0); 74 } 75 }); 76 77 // SPããã¯ã¼ã¡ãã¥ã¼ 78 $('.un_menuToggleSP').on('click', function (event) { 79 event.stopPropagation(); 80 81 // ã¡ãã¥ã¼OFF 82 if ($(this).hasClass('active')) { 83 $('.un_menu').css({ top: '200vh' }); 84 $(this).removeClass('active'); 85 $('nav').removeClass('active'); 86 // ã¹ã¯ãã¼ã«ããã¯è§£é¤ 87 $('body').css({ height: 'auto', overflow: 'scroll' }); 88 } 89 // ã¡ãã¥ã¼ON 90 else { 91 // ã¡ãã¥ã¼ããããã¼ã®é«ãã®ä½ç½®ããéå§ãã 92 const headerHeight = $('.ly_headerSP').height(); 93 $('.un_menu').css({ top: headerHeight }); 94 $(this).addClass('active'); 95 $('.un_menu').addClass('active'); 96 // ã¹ã¯ãã¼ã«ãã㯠97 $('body').css({ height: '100vh', overflow: 'hidden' }); 98 // ããå é¨ãä¸çªä¸ã«ç§»å 99 $('.un_menu').scrollTop(0); 100 } 101 }); 102 103 // SPæ¤ç´¢ãã¿ã³ 104 $('.un_menuToggleSearch').on('click', function (s) { 105 s.stopPropagation(), 106 $(this).hasClass('active') 107 ? ($('.un_search').css({ 108 top: '200vh', 109 }), 110 $(this).removeClass('active'), 111 $('nav').removeClass('active'), 112 $('body').css({ 113 height: 'auto', 114 overflow: 'scroll', 115 })) 116 : ((s = $('.ly_headerSP').height()), 117 $('.un_search').css({ 118 top: s, 119 }), 120 $(this).addClass('active'), 121 $('.un_search').addClass('active'), 122 $('body').css({ 123 height: '100vh', 124 overflow: 'hidden', 125 }), 126 $('.un_search').scrollTop(0)); 127 }); 128 129 // PC bodyã¯ãªãã¯ã§ã¡ãã¥ã¼ãéãã 130 $(document).on('click', function () { 131 $('.un_menuTogglePC').removeClass('active'); 132 $('nav').removeClass('active'); 133 // ã¹ã¯ãã¼ã«ããã¯è§£é¤ 134 $('body').css({ height: 'auto', overflow: 'scroll' }); 135 }); 136});
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.