<script src='http://ajax.googleapis.com/ajax/libs/jquery/1.8.2/jquery.min.js' type='text/javascript'/>atau macam ni :
<script type="text/javascript" src="http://ajax.googleapis.com/ajax/libs/jquery/1.8.2/jquery.min.js"></script>PERHATIAN
Kalau korang tiada kod di atas, sila ikut arahan dibawah pula
1) Template >> Edit HTML
2) CTRL+F dan cari kod </head>
3) Korang copy and paste salah satu kod di atas dan save
Sekarang korang dah ada kod tu. So, mari ke step yang seterusnya
2) Klik Layout >> Add Gadget >> Javascript/HTML
3) Copy dan paste kod berikut
<style>.mbw-back-to-top { position: fixed; bottom: 2em; right: 10px; text-decoration: none; padding: 1em; display: none; cursor:pointer;}</style><img class="mbw-back-to-top" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhwRlBK8ryuG4hnrXGOT1ID1TQR9-VTkzjhM_CcHZsK9fT6FqHEWxu9bjE8ICi1K-GyWPdrDYLDTkEQoF8lLf6BYx-e01ofowUGN16D0M5zQohVaCsew45DexTb9r1jZ6DqWw7g0jTBEsI/s1600/back+to+top.png" /><script type="text/javascript">/*****mybloggersworld.com***/jQuery(document).ready(function() { var offset = 220; var duration = 500; jQuery(window).scroll(function() { if (jQuery(this).scrollTop() > offset) { jQuery('.mbw-back-to-top').fadeIn(duration); } else { //www.mybloggersworld.com jQuery('.mbw-back-to-top').fadeOut(duration); } }); jQuery('.mbw-back-to-top').click(function(event) { event.preventDefault(); jQuery('html, body').animate({scrollTop: 0}, duration); return false; })});</script>Perhatian
Gantikan yang warna merah tuk dengan gambar button yang korang nak.
Tiada ulasan:
Catat Ulasan