잔글편집 요약 없음 |
잔글편집 요약 없음 |
||
2번째 줄: | 2번째 줄: | ||
'use strict'; | 'use strict'; | ||
$( 'body' ).append( '< | $( 'body' ).append( '<button id="global-new-tweet-button" class="js-global-new-tweet js-tooltip EdgeButton EdgeButton--primary js-dynamic-tooltip" data-placement="bottom" data-component-context="new_tweet_button" data-original-title=""> | ||
<span class="text">리브레 위키</span> | |||
</button>' ); | |||
var $topButton = $( '#to-top' ); | var $topButton = $( '#to-top' ); | ||
2017년 11월 23일 (목) 19:52 판
$( function() {
'use strict';
$( 'body' ).append( '<button id="global-new-tweet-button" class="js-global-new-tweet js-tooltip EdgeButton EdgeButton--primary js-dynamic-tooltip" data-placement="bottom" data-component-context="new_tweet_button" data-original-title="">
<span class="text">리브레 위키</span>
</button>' );
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' );
}
} );
} );
$( function() {
'use strict';
$( 'body' ).append( '<span id="to-bottom" style="font-size:20pt; color:pink;" >▽</span>' );
var $bottomButton = $( '#to-bottom' );
var height=document.body.scrollHeight;
var hminus=document.body.scrollHeight-"650";
$bottomButton.css( {
'color': 'black',
'position': 'fixed',
'bottom': '-30px',
'left': '42pt',
'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() {
$( 'html, body' ).animate( { scrollTop:height}, 'slow' );
} );
$( window ).scroll( function() {
if ( $( window ).scrollTop () <hminus ) {
$bottomButton.css( 'bottom', '4px' );
} else {
$bottomButton.css( 'bottom', '-30px' );
}
} );
} );