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