ব্যবহারকারী:Yahya/শীর্ষে যান.js
লক্ষ্য করুন: প্রকাশ করার পর, পরিবর্তনগুলো দেখতে আপনাকে আপনার ব্রাউজারের ক্যাশে পরিষ্কার করার প্রয়োজন হতে পারে।
- ফায়ারফক্স / সাফারি: পুনরায় লোড-এ ক্লিক করার সময় শিফট টিপে ধরে রাখুন, অথবা হয় Ctrl-F5 বা Ctrl-R টিপুন (ম্যাকে ⌘-R টিপুন)
- গুগল ক্রোম: Ctrl-Shift-R (ম্যাকে ⌘-Shift-R) টিপুন
- ইন্টারনেট এক্সপ্লোরার / এজ: Ctrl ধরে রাখা অবস্থায় Refresh-এ ক্লিক করুন, অথবা Ctrl-F5 টিপুন
- অপেরা: Ctrl-F5 টিপুন।
/*
This script was created by Majr of the Minecraft Wiki. The original script is available here: https://minecraft.gamepedia.com/User:Majr/goToTop.js
Customised for bnwiki by [[User:Yahya]] */
$( function() {
'use strict';
$( 'body' ).append( '<span id="to-top">▲শীর্ষে যান</span>' );
var $topButton = $( '#to-top' );
$topButton.css( {
'color': 'red',
'position': 'fixed',
'bottom': '-30px',
'left': '150px',
'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: 0 }, 'slow' );
} );
$( window ).scroll( function() {
if ( $( window ).scrollTop() > 100 ) {
$topButton.css( 'bottom', '4px' );
} else {
$topButton.css( 'bottom', '-30px' );
}
} );
} );