1// ------------------------------------------ 2// ã¯ãã¼ã³ãããã¼(追å¾ç¨) 3// ------------------------------------------ 4 5( function ( $ ) { 6 const $win = $( window ); 7 let position = 0; 8 9 $win.on( 'scroll', function () { 10 // overflow: hidden ã®ã¨ãã¯å¦çã¹ããã 11 if ( 'hidden' === $( 'body' ).css( 'overflow' ) ) { 12 return; 13 } 14 15 const headerClone = $( '.l-header_clone' ); // ã¯ãã¼ã³ãããã¼ã®classå 16 const showClass = 'is-show'; // ãã°ã«ãããclasså 17 const headerHeight = headerClone.outerHeight() * 2; // ã¯ãã¼ã³ãããã¼ã®é«ãÃ2 18 const scrollPos = $( this ).scrollTop(); // ä¸ã¸ã¹ã¯ãã¼ã«ããæã®ä½ç½® 19 20 // ä¸ã«ã¹ã¯ãã¼ã«ããæ & ä¸ã¸ã¹ã¯ãã¼ã«ããæã®ä½ç½®ãã¯ãã¼ã³ãããã¼ã®é«ãÃ2ãã大ããå ´å 21 if ( scrollPos < position && scrollPos > headerHeight ) { 22 // class追å 23 headerClone.addClass( showClass ); 24 } else { 25 // classåé¤ 26 headerClone.removeClass( showClass ); 27 } 28 position = scrollPos; 29 } ); 30} )( jQuery );
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.