1 2 3// ã°ãã¼ãã«å¤æ° 4var syncerTimeout = null ; 5 6// ä¸é£ã®å¦ç 7$( function() 8{ 9 // ã¹ã¯ãã¼ã«ã¤ãã³ãã®è¨å® 10 $( window ).scroll( function() 11 { 12 // 1ç§ãã¨ã«å¦ç 13 if( syncerTimeout == null ) 14 { 15 // ã»ããã¿ã¤ã ã¢ã¦ããè¨å® 16 syncerTimeout = setTimeout( function(){ 17 18 // 対象ã®ã¨ã¬ã¡ã³ã 19 var element = $( '#page-top' ) ; 20 21 // ç¾å¨ã表示ããã¦ãããï¼ 22 var visible = element.is( ':visible' ) ; 23 24 // æä¸é¨ããç¾å¨ä½ç½®ã¾ã§ã®è·é¢ãåå¾ãã¦ã夿°[now]ã«æ ¼ç´ 25 var now = $( window ).scrollTop() ; 26 27 // æä¸é¨ããç¾å¨ä½ç½®ã¾ã§ã®è·é¢ãè¨ç®ãã¦ã夿°[under]ã«æ ¼ç´ 28 var under = $( 'body' ).height() - ( now + $(window).height() ) ; 29 30 // æä¸é¨ããç¾å¨ä½ç½®ã¾ã§ã®è·é¢(now)ã1500以ä¸ã㤠31 // æä¸é¨ããç¾å¨ä½ç½®ã¾ã§ã®è·é¢(under)ã200px以ä¸ãã¤â¦ 32 if( now > 500 && 0 < under ) 33 { 34 // éè¡¨ç¤ºç¶æ ã ã£ãã 35 if( !visible ) 36 { 37 // [#page-top]ããã£ãããã§ã¼ãã¤ã³ãã 38 element.fadeIn( 'slow' ) ; 39 } 40 } 41 42 // 1500px以ä¸ã㤠43 // è¡¨ç¤ºç¶æ ã ã£ãã 44 else if( visible ) 45 { 46 // [#page-top]ããã£ãããã§ã¼ãã¢ã¦ããã 47 element.fadeOut( 'slow' ) ; 48 } 49 50 // ãã©ã°ãåé¤ 51 syncerTimeout = null ; 52 } , 500 ) ; 53 } 54 } ) ; 55 56 // ã¯ãªãã¯ã¤ãã³ããè¨å®ãã 57 $( '#move-page-top' ).click( 58 function() 59 { 60 // ã¹ã ã¼ãºã«ã¹ã¯ãã¼ã«ãã 61 $( 'html,body' ).animate( {scrollTop:0} , 'slow' ) ; 62 } 63 ) ; 64} ) ;
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.