|
|
1번째 줄: |
1번째 줄: |
| $( function() {
| | /*제이쿼리는 안 배웠어요 ;*/ |
| 'use strict';
| |
| | |
| $( 'body' ).append( '<span id="to-top" style="font-size:20pt; color:pink;" >리브레 위키</span>' );
| |
| var $topButton = $( '#to-top' );
| |
| | |
| $topButton.css( {
| |
| 'color': 'black',
| |
| 'position': 'fixed',
| |
| 'bottom': '-30px',
| |
| 'left': '4px',
| |
| 'cursor': 'pointer',
| |
| 'transition': 'bottom 0.5s',
| |
| '-webkit-transition': 'bottom 0.5s',
| |
| 'user-select': 'none',
| |
| '-webkit-user-select': 'none',
| |
| '-moz-user-select': 'none',
| |
| '-ms-user-select': 'none'
| |
| } ).click( function() {
| |
| $(searchform.searchInput.value = "리브레 위키");
| |
| } );
| |
| | |
| $( window ).scroll( function() {
| |
| if ( $( window ).scrollTop() > 100 ) {
| |
| $topButton.css( 'bottom', '4px' );
| |
| } else {
| |
| $topButton.css( 'bottom', '-30px' );
| |
| }
| |
| } );
| |
| } );
| |
| | |
| } );
| |
| } );
| |